User forums > Using Code::Blocks
Upgrading to wxWidgets 3.1.3
spflanze:
I turned off the compilation of the file wx_pch.h. I did this by right clicking on it, and in the pop up menu, unchecking the "Compile file" box at "Properties => Build (tab"). In that tab the "Link file" checkbox is also unchecked. It still did not compile. It was the same error as before.
The compiler is on the path: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\ . Here the gcc.exe and g++.exe compilers are used for both compiling wxWidgets, and my application in Code::Blocks. I verified this with the Window 7 command prompt's "where" command. This compiler setup was installed using the file "mingw-w64-install.exe", which was downloaded from https://mingw-w64.org/doku.php. I see now I do not have the latest version of it.
I searched the entire disk drive for the file "mingw32-g++.exe" using the Windows Explorer. I found it in several places, including an embedded development installation. I attempted to find out which of them is executed when I attempt to compile my application in Code::Blocks using the Windows 7 command prompt command "where mingw32-g++.exe". But the where command could not find any instances of it, in spite of the Windows Explorer's search results.
stahta01:
What is the CB compiler toolchain path set to?
"Compiler Installation Directory"
Edit2: Settings -> Compiler
Select the correct compiler
Tab: Toolchain Executable
Post the build log; either you are compiling the same file or you are not!
If you are still compiling the old file [wx_pch.h] then you failed to stop compiling it.
Tim S.
stahta01:
--- Quote from: sodev on February 22, 2020, 01:54:34 am ---
--- 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?
--- End quote ---
NOTE: If you are using an Custom makefile instead of an normal CB project then you are wasting time asking questions on this website!
Tim S.
stahta01:
Please post the contents of the "wx_pch.h" file maybe you have a error in it?
Tim S.
spflanze:
In: Settings => Compiler => Toolchain executables (tab):
Compilers installation directory: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
C Compiler: gcc.exe
C++ Compiler: g++.exe
Linker for dynamic libs: gcc.exe
Linker for static libs: ar.exe
Debugger: GDB/CDB debugger: TDM-GCC-64
Resource compiler: windres.exe
Make program: mingw32-make.exe
The path to all of the above was checked using the "..." to the right of the above fields. For all of them they are:
C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
This same path is what was verified using the "where" command on gcc.exe, and g++.exe, when I checked which compilers compiled wxWidgets.
It appears that unchecking that box did not prevent wx_pch.h being in the compile, as is evident in the build log:
--- Code: ----------------- Build: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------
[ 5.3%] 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:\Engineering_Software\Libraries\cminpack-1.3.6\cpp\dpmpar.cpp -o obj\Debug\Libraries\cminpack-1.3.6\cpp\dpmpar.o
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:\Engineering_Software\Libraries\cminpack-1.3.6\cpp\dpmpar.cpp -o obj\Debug\Libraries\cminpack-1.3.6\cpp\dpmpar.o' in 'C:\Engineering_Software\TIA Designer' failed.
--- End code ---
What is an effective way to exclude it? The contents of the wx_pch.h file:
--- Code: ---#ifndef WX_PCH_H_INCLUDED
#define WX_PCH_H_INCLUDED
// basic wxWidgets headers
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#ifdef WX_PRECOMP
// put here all your rarely-changing header files
#endif // WX_PRECOMP
--- End code ---
In project build options for Debug, which is the mode I am trying to compile in now, in the path Build options... => Debug => Search directories (tab) I have listed each tab's content below:
Compiler: $(#wx.lib)\gcc_dll\mswud
Linker: (#wx.lib)\gcc_dll
Resource compiler: (#wx.lib)\gcc_dll
In Global variables the value of wx.lib is blank. The global base is: C:\wxWidgets-3.1.3
I do not recall ever setting up a custom make file. Where do I look to verify it is a normal CB project?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version