OS is Windows 7, CB version 10.05 (just installed, updated from 8.02), wxWidgets version 2.9.1.
After downloading and running wxMSW-2.9.1-Setup.exe, I tried to build wxWidgets for Code::Blocks using MinGW by following the instructions in the Wiki here (http://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#WxWidgets_help_on_Codeblocks_Wiki). Although it's a wxWidgets Wiki, in the last line it says to ask in the CB forum if there are problems - so here I am, hopefully in the right place. :)
After editing config.gcc as specified, after the 'clean' step, I built with the command line
c:\wxWidgets-2.9.1\build\msw>mingw32-make.exe -f makefile.gcc > c:\users\jeff\temp\wx.log
to capture the output. I didn't capture the error output directly (I think there's a trick using numbers to redirect stderr as well which I need to look up), but copied this from the command window and pasted into another file (wx_error.txt), so I have everything.
After a quite a few what looked like minor warnings, I then started to get serious problems. There were a couple of dozen lines with the form
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.973 ' unrecognized
Then a whole host of undefined references in libwxscintilla.a similar to
..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text+0x7219): undefined reference to `_imp__wxTheAssertHandler'
And finally
collect2: ld returned 1 exit status
mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw291_gcc_custom.dll] Error 1
In the gcc_dll folder I ended up with 8 libraries (.a) and no dll. Please can you help! If you need any more, I have all the output from the build.
@jeffg: Those directions are for wxWidgets 2.8; they are not correct for wxWidgets 2.9!
Old wxWidgets 2.9.0 directions http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.9.0_to_develop_Code::Blocks_%28MSW%29
I can confirm that I can compile v2.9.1 using the instruction from the link above on Vista 32bit (See below), trying right now to do it using MinGW64...
The result using MINGW64 is an error in dlmsw.cpp:
../../src/msw/dlmsw.cpp: In static member function 'static wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()':
../../src/msw/dlmsw.cpp:288:29: error: invalid conversion from 'BOOL (*)(CHAR*, wxDynamicLibraryDetailsCreator::DWORD_32_64, ULONG, void*)' to 'WINBOOL (*)(const CHAR*, DWORD64, ULONG, void*)'
mingw32-make: *** [gcc_mswudll\monodll_dlmsw.o] Error 1
The exact version of MinGW GCC used by both users?
32 or 64 bit version of build and machine/computer?
I'm trying two setups:
- Vista 32bit with gcc version 4.5.1 (tdm-1)
- Windows 7 64bit with gcc version 4.5.1 (tdm64-1)
@Tim:
My ultimate goal is to have C::B entirely compile for 64bit on Windows 7. Any experience on that?
My version of mingw32-g++ is the version bundled with CB 10.05, i.e 4.4.1 (TDM-2 mingw32).
I will try rebuilding using the instructions in your link. Presumably the reason it says that it's not a stable version is because it's old text.
I'm a bit puzzled though: since the wxWidgets stuff is all self-contained (makefiles, sources), I don't see why there should be any errors or warnings however you build it. How does it depend on the version of mingw32? Probably I'm being naive here :)
EDIT: Rebuilt using new instructions and now I have 2 DLLs!! wxmsw291u_gcc_custom.dll and wxmsw291u_gl_gcc_custom.dll.
I have no errors, but still a lot of warnings similar to:
Creating library file: ..\..\lib\gcc_dll\libwxmsw29u.a
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.1000 ' unrecognized
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.1225 ' unrecognized
That's the Unicode/Release version. Should I now go ahead to create all four sets of DLLs: unicode/non-unicode release/debug ? If I want to build a wxWidgets project, can I build the main project with debug using the release version of wxWidgets? I assume I can. How about unicode/non-unicode?
Sorry for so many questions.
EDIT #2: I think I have answered my own question. When I created a new wxWidgets project in CB, I could only choose Release and Unicode to get a clean build - if I didn't check the Unicode box I got undefined reference errors, and it wouldn't build a Debug version. Therefore I need to build all four sets. Still, getting one clean build which runs is a big leap forward for me! :)
EDIT #3: I have managed to build both Release and Debug versions with Unicode, but I get the similar errors in Scintilla that I got before when building with UNICODE=0.