User forums > General (but related to Code::Blocks)
Using C::B's MinGW to compile wxWidgets 2.8.12 -> ld.exe error
kirash4:
I'm trying to use the build-in MinGW that comes with C::B to compile wxWidgets 2.8.12. The process runs for some time and then fails with the following error:
--- Code: ---Creating library file: ..\..\lib\gcc_dll\libwxmsw28.a
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../..
/mingw32/bin/ld.exe: out of memory allocating 160 bytes
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw28_gcc_custom.dll] Error 1
--- End code ---
The compile command issued was:
--- Code: ---T:\wxMSW-2.8.12\build\msw>mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
--- End code ---
That is just duplicating what's also in the config.gcc file as far as the command line options goes.
Looking at the system's memory usage, during that last step, memory usage climbs to about 5.6GB out of the system's 8GB. It's a Win7 64-bit machine. Should I forego the MinGW version that comes with C::B and install a stand alone version and try compiling with that?
Jenna:
Have a look at: http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Build_wxWidgets.
You need to add CXXFLAGS=-fno-keep-inline-dllexport or you run out of memory while linking.
You should also use UNICODE=1 unless you build for a real old windows version (pre Win2000), but you will not be able to build C::B (at least not without really heavy modification).
kirash4:
Oh I'm not doing this to build C::B on Windows. I'm trying to get every library compiled using the same compiler, in hopes that it will make things easier. ImageMagick releases two flavors of binaries, one for CygWin and one for MinGW. So I'm trying to figure out which way to go with wx. If I can get it compiled for both, then great, it gives me multiple options, otherwise I'll stick to one or the other.
I was following the instructions posted here: http://wiki.wxwidgets.org/CodeBlocks_Setup_Guide which recommended setting unicode=0 - I suppose that's specific to getting C::B itself compiled against wx.
Thanks for the CXXFLAGS note.
Jenna:
--- Quote from: kirash4 on May 09, 2014, 11:33:29 pm ---I was following the instructions posted here: http://wiki.wxwidgets.org/CodeBlocks_Setup_Guide which recommended setting unicode=0 - I suppose that's specific to getting C::B itself compiled against wx.
--- End quote ---
--- Quote from: jens on May 09, 2014, 11:27:19 pm ---You should also use UNICODE=1 unless you build for a real old windows version (pre Win2000), but you will not be able to build C::B (at least not without really heavy modification).
--- End quote ---
The link in the wxWidgets-wiki is definitely outdated.
kirash4:
One thing I noticed is the link you gave me does not mention the USE_XRC=1 option. Is that no longer relevant?
Navigation
[0] Message Index
[#] Next page
Go to full version