Hello I am trying to build wxWidgets 3.0 for use with code blocks. When I run the command given on the manual
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
It says an error include \include/setup/.h:121:27: fatal error: ../../../lib/vc_x64_lib/mswu/wx/setup.h
It also says
C:\wxWidgets-3.0.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
if not exist ..\..\lib\gcc_dll\mswu mkdir ..\..\lib\gcc_dll\mswu
gcc -c -o gcc_mswudll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__ -D_UNICODE -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/platform.h:183:0,
from ..\..\include/wx/defs.h:27,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:12:6: error: #error "This file should only be included when using Microsoft Visual C++"
#error "This file should only be included when using Microsoft Visual C++"
^
In file included from ..\..\include/wx/version.h:16:0,
from ..\..\include/wx/setup.h:19,
from ..\..\include/wx/platform.h:183,
from ..\..\include/wx/defs.h:27,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:113:31: error: pasting "/" and "vc_x64_lib" does not give a valid preprocessing token
wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
The manual I’m following is : http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
If anything you try still gives errors then follow these instructions:
Remove the whole of the wxWidgets folder, in your case
C:\wxWidgets-3.0.4Re-install wxWidgets, even in that same directory
Remove anything related to your old gcc (likely a dir and the PATH var, see below), and download an install a more recent version of gcc. From Mingw 32 mingw-get-setup.exe, from Mingw 64 or from TDM combined 32/64. You will need to set this compiler as the default one to C::B later, for your app.
Add if needed your
mingw/bindir to the Windows PATH environment var.Open an command box window and copy&paste this line:
Note I've removed the MONOLITHIC=1 flag, sometimes it's a source of problems. The only consequence is that you have to add to your project settings a few libs (base, core, etc and in a proper order) instead of an only big one. Take a look at
<wxWidgets dir>\libAddin
mingw\binto the PATH is an option. C::B doesn't need it. It's the command box who needs it. If you don't want to pollute the PATH var then you have to add it each time you open a command box to use the compiler:Execute
PATH=%PATH%;C:\MinGW\bin(where MinGW is where you installed the compiler) before using the compiler in this command box.