User forums > Using Code::Blocks
Upgrading to wxWidgets 3.1.3
sodev:
Oops, for some unknown reason i thought he is building CodeBlocks ::) ;D
Well, but because he is not, it is easier to use a debug build of wxWidgets.
--- Code: ---mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
--- End code ---
This produces a variant with debug symbols and also enables the assertions. No need to mess around with debug levels, the default settings are good enough. Create a second configuration and link against that debug variant.
About possible PCH related problems, depending on the PCH strategy CodeBlocks might not delete a present PCH file. Check the output folders and remove all PCH files to start a fresh build.
spflanze:
I recompiled wxWidgets. This is the batch file I did it with:
--- Code: ---REM Change the current working directory
cd C:\wxWidgets-3.1.3\build\msw
REM Compile the release version
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
REM Compile the debug version
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug
--- End code ---
In Code::Blocks, when I attempt to compile in debug my application that did compile before the wxWidgets upgrade, I still get an error:
--- Code: ---
-------------- Build: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------
[ 5.0%] mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -Winline -Wall -pg -m64 -g -g3 -I..\Libraries\cminpack-1.3.6 -IC:\wxWidgets-3.1.3\lib\gcc_dll\mswud -c "C:\Software\Designer\wx_pch.h" -o "wx_pch.h.gch\Debug_TIA Designer_wx_pch_h_gch"
Execution of 'mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -Winline -Wall -pg -m64 -g -g3 -I..\Libraries\cminpack-1.3.6 -IC:\wxWidgets-3.1.3\lib\gcc_dll\mswud -c "C:\Software\Designer\wx_pch.h" -o "wx_pch.h.gch\Debug_TIA Designer_wx_pch_h_gch"' in 'C:\Software\Designer' failed.
--- End code ---
stahta01:
Please post information about your Compiler?
Edit: You do know that wxWidgets is a C++ Library, therefore you should use the same compiler to built it and the code that uses the library.
And, to build a 64 bit application the compiler and the library both need to be 64 bit.
Tim S.
stahta01:
NOTE: I would stop trying to build the pch file till you get the rest of the files to build.
The error message is not very good while building the PCH (Precompiled Header)
You can do this by disable compile on the file "wx_pch.h"
And, I would remove the option "-include wx_pch.h" till you start trying to build PCH again.
You also, should replace "-DWX_PRECOMP" with "-DNOPCH"
Tim S.
sodev:
--- Quote from: spflanze on February 22, 2020, 12:22:30 am ---
--- Code: ---[ 5.0%] mingw32-g++.exe -Wall -pipe -mthreads...
--- End code ---
--- End quote ---
This percentage display at the start of line looks unfamiliar for me, usually the CodeBlocks build system doesn't output that. Are you using CMake or so as build system?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version