User forums > General (but related to Code::Blocks)
Compiling wxWidgets 2.8.12 with MinGW-Builds 5.2.0 for use in CodeBlocks Windows
headkase:
MinGW-Builds can be found: Here in either "Toolchains targetting Win32/64" and then "Personal Builds" and "mingw-builds" then 5.2.0 and then your threading and exception preferences.
To build Code::Blocks from SVN, you generally follow the instructions: Here.
The problem is that with MinGW-Builds 5.2.0 the compilation will fail while building wxWidgets 2.8.12. Just fail. Goodbye, try again.
I have been dealing with this issue, and as a result have had to use the provided nightlies for quite the while, but now after much persistence I have found the solution.
See: Here.
In the file: \path\to\mingw32\i686-w64-mingw32\include\commctrl.h
(Or 64 bit 5.2.0: \path\to\mingw64\x86_64-w64-mingw32\include\commctrl.h)
Find the _WIN32_IE 0x0501 definition block and make it look exactly like this:
--- Code: ---ifndef WINRESRC
ifndef _WIN32_IE
//#define _WIN32_IE 0x0501
endif
endif
#define _WIN32_IE 0x0603
--- End code ---
Now, wxWidgets on MinGW-Builds 5.2.0 will compile and then you can move onto compiling Code::Blocks itself. And there was much rejoicing. :)
You can even build wxWidgets in 64 bit (using "CFG=64" on its build line) MinGW 5.2.0 BUT there is no 64 bit vanilla project in the Code::Blocks source to go from there.
I used these exact lines in config.gcc for wxWidgets:
--- Code: ---# Standard flags for CC
CFLAGS ?= -fno-keep-inline-dllexport
# Standard flags for C++
CXXFLAGS ?= -fno-keep-inline-dllexport -std=gnu++11 -fpermissive
--- End code ---
I'm pretty happy now, the only thing that could make things even better is if a 64 bit codeblocks.cbp project was added to the trunk source so I could go full 64 bit with everything. ;) :)
MortenMacFly:
--- Quote from: headkase on December 18, 2015, 05:43:53 am ---
--- Code: ---# Standard flags for CC
CFLAGS ?= -fno-keep-inline-dllexport
# Standard flags for C++
CXXFLAGS ?= -fno-keep-inline-dllexport -std=gnu++11 -fpermissive
--- End code ---
--- End quote ---
Why don't you expand this to:
--- Code: ---# Standard flags for CC
CFLAGS ?= -D_WIN32_IE=0x0603 -fno-keep-inline-dllexport
# Standard flags for C++
CXXFLAGS ?= -D_WIN32_IE=0x0603 -fno-keep-inline-dllexport -std=gnu++11 -fpermissive
--- End code ---
?
This would avoid to patch the source files.
headkase:
I didn't do it simply because of ignorance that it could be done. Thank you for the tip, I'm going to go do a test compile right now.
headkase:
Built successfully, thank you again. I bumped -std=gnu++11 up to -std=gnu++14 too with no adverse affects. May not even need that but I'm not concerned over it. ;)
May I ask however is that is there a simple method to modify the codeblocks.cbp and contributor's plugin workspace to target 64 bit? Compilation fails with the regular workspace when using a 64 bit compiler toolchain. Also, right now the only 64 bit projects use wx 3.0.x and that version of wx while I can compile it fine just doesn't work for me. The cursor caret in an editor window with it does not behave properly.
MortenMacFly:
--- Quote from: headkase on December 18, 2015, 08:23:44 am ---May I ask however is that is there a simple method to modify the codeblocks.cbp and contributor's plugin workspace to target 64 bit?
--- End quote ---
Whats wrong with the 64 bit workspace (CodeBlocks_wx30_64.cbp) ?
Navigation
[0] Message Index
[#] Next page
Go to full version