User forums > Help
Errors building wxWidgets for Code::Blocks
jeffg:
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. 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
--- Code: ---c:\wxWidgets-2.9.1\build\msw>mingw32-make.exe -f makefile.gcc > c:\users\jeff\temp\wx.log
--- End code ---
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
--- Code: ---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
--- End code ---
Then a whole host of undefined references in libwxscintilla.a similar to
--- Code: ---..\..\lib\gcc_dll\libwxscintilla.a(wxscintilla_Editor.o):Editor.cxx:(.text+0x7219): undefined reference to `_imp__wxTheAssertHandler'
--- End code ---
And finally
--- Code: ---collect2: ld returned 1 exit status
mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw291_gcc_custom.dll] Error 1
--- End code ---
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.
daniloz:
I'm having the same problem with Vista 32 bit and MinGW32.
stahta01:
@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
The exact version of MinGW GCC used by both users?
32 or 64 bit version of build and machine/computer?
The errors look like compiler errors to me.
Tim S.
daniloz:
--- Quote from: stahta01 on March 02, 2011, 10:00:15 pm ---@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
--- End quote ---
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:
--- Code: ---../../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
--- End code ---
--- Quote from: stahta01 on March 02, 2011, 10:00:15 pm ---The exact version of MinGW GCC used by both users?
32 or 64 bit version of build and machine/computer?
--- End quote ---
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?
daniloz:
On step furhter. The error in dlmsw.cpp can be solved by this patch:
http://trac.wxwidgets.org/ticket/12465
Compiling further...
wxWidgets 2.9.1 successfully built with MinGW64...
Navigation
[0] Message Index
[#] Next page
Go to full version