User forums > General (but related to Code::Blocks)

Error building wxwidgets projects with GCC 13.2.0 in CB 13421

<< < (3/4) > >>

PB:

--- Quote from: Grit Clef on December 31, 2023, 03:14:20 pm ---(Now I change to the official 3.2.4 release, headers and libraries) It's the same when I build from the command line.

--- End quote ---

AFAICT, there is no official wxWidgets 3.2.4 binary release using GCC 13.2 (latest being GCC 12.2 from MSYS2)?

Were wxWidgets really built by the same compiler (or a really compatible one) that you are using for your application? If not, there are bound to be build- and run-time issues.

FWIW, wxWidgets 3.2.4 self-built with GCC 13.2 can be used with application built with GCC 13.2, tested several configurations for my guide.

stahta01:
Till you post the current compiler and OS information I will stop trying to help you.
Please include whether 32 or 64 bit; please include MINGW32, MINGW64, or UCRT64 if using MSys2 compiler.

stahta01:

--- Quote from: PB on January 01, 2024, 06:18:53 pm ---
--- Quote from: Grit Clef on December 31, 2023, 03:14:20 pm ---(Now I change to the official 3.2.4 release, headers and libraries) It's the same when I build from the command line.

--- End quote ---

AFAICT, there is no official wxWidgets 3.2.4 binary release using GCC 13.2 (latest being GCC 12.2 from MSYS2)?

Were wxWidgets really built by the same compiler (or a really compatible one) that you are using for your application? If not, there are bound to be build- and run-time issues.

FWIW, wxWidgets 3.2.4 self-built with GCC 13.2 can be used with application built with GCC 13.2, tested several configurations for my guide.

--- End quote ---

It builds and runs for MSys2 MINGW64; I was surprised.

--- Code: ----------------- Clean: Debug in gcc_mingw64 (compiler: GNU GCC Compiler)---------------

Cleaned "gcc_mingw64 - Debug"
Running project pre-build steps
gcc --version
gcc (Rev3, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-------------- Build: Debug in gcc_mingw64 (compiler: GNU GCC Compiler)---------------

g++.exe -pipe -mthreads -Wall -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -g -D__WXDEBUG__ -IH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include -IH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\lib\gcc1220_x64_dll\mswud -c H:\devel\wxwidgets_libs\test\gcc12\gcc12App.cpp -o obj\Debug\gcc12App.o
g++.exe -pipe -mthreads -Wall -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -g -D__WXDEBUG__ -IH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include -IH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\lib\gcc1220_x64_dll\mswud -c H:\devel\wxwidgets_libs\test\gcc12\gcc12Main.cpp -o obj\Debug\gcc12Main.o
windres.exe -IH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include -IH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\lib\gcc_dll\mswud  -J rc -O coff -i H:\devel\wxwidgets_libs\test\gcc12\resource.rc -o obj\Debug\resource.res
g++.exe -LH:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\lib\gcc1220_x64_dll -o bin\Debug\gcc12.exe obj\Debug\gcc12App.o obj\Debug\gcc12Main.o  obj\Debug\resource.res -mthreads  -lwxmsw32ud_core -lwxbase32ud
H:\devel\wxwidgets_libs\test\gcc12\gcc12Main.cpp: In constructor 'gcc12Dialog::gcc12Dialog(wxDialog*, const wxString&)':
H:\devel\wxwidgets_libs\test\gcc12\gcc12Main.cpp:58:70: warning: 'wxFont::wxFont(int, int, int, int, bool, const wxString&, wxFontEncoding)' is deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants ie: wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD [-Wdeprecated-declarations]
   58 |     m_staticText1->SetFont(wxFont(20, 74, 90, 90, false, wxT("Arial")));
      |                                                                      ^
In file included from H:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include/wx/font.h:627,
                 from H:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include/wx/window.h:23,
                 from H:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include/wx/wx.h:38,
                 from H:\devel\wxwidgets_libs\test\gcc12\gcc12Main.h:14,
                 from H:\devel\wxwidgets_libs\test\gcc12\gcc12Main.cpp:14:
H:\devel\wxwidgets_libs\wxMSW-3.2.4_gcc1220_x64_Dev\include/wx/msw/font.h:130:5: note: declared here
  130 |     wxFont(int size,
      |     ^~~~~~
Output file is bin\Debug\gcc12.exe with size 1.12 MB
Process terminated with status 0 (0 minute(s), 7 second(s))
0 error(s), 1 warning(s) (0 minute(s), 7 second(s))
 
--- End code ---

Grit Clef:
Compiler info: GCC 13.2.0 (with POSIX threads) dwarf + MinGW-w64 11.0.1 (UCRT) - release 3
OS: Windows 7 Ultimate 32-bit with Service Pack 1
I haven't used Msys2, because it doesn't support 32-bit systems.
My wxWidgets is just downloaded from wxWidgets' github repository, there's one for gcc1320 that the binaries wxWidgets provide contain.
"W:\Libraries\wxWidgets-3.2.4\lib\gcc_dll\mswud"does exist, originally there's a directory named gcc1320_dll, and I changed it to gcc_dll(Is this wrong?).
I think maybe I should compile wxWidgets myself when necessary, but on my old computer it's very slow...

stahta01:

--- Quote from: Grit Clef on January 02, 2024, 05:10:01 am ---Compiler info: GCC 13.2.0 (with POSIX threads) dwarf + MinGW-w64 11.0.1 (UCRT) - release 3
OS: Windows 7 Ultimate 32-bit with Service Pack 1
I haven't used Msys2, because it doesn't support 32-bit systems.
My wxWidgets is just downloaded from wxWidgets' github repository, there's one for gcc1320 that the binaries wxWidgets provide contain.
"W:\Libraries\wxWidgets-3.2.4\lib\gcc_dll\mswud"does exist, originally there's a directory named gcc1320_dll, and I changed it to gcc_dll(Is this wrong?).
I think maybe I should compile wxWidgets myself when necessary, but on my old computer it's very slow...

--- End quote ---

You might need to build it yourself or use a GCC compiler that was used to build the wxWidgets library. Mixing UCRT with non UCRT is not likely to work. Mixing GCC versions might work or might not.

Edit5: I was guessing that the wxwidgets you downloaded was non UCRT; this can likely be the cause of the weird errors.
Edit4: Building using UCRT64 GCC compiler under MSys2 (using MINGW64 [non-UCRT] wxWidgets) resulted in a run-time error; so, not sure now what caused your error.

Edit3: Renaming "gcc1320_dll" to "gcc_dll" should work okay.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version