Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
FYI: GCC 4.5.0 on Mingw.org
reckless:
should be the same for any os ;)
well i was'nt sure it was 2.20 i use 2.20.1 and i have it :)
im on windows 7 64 bit so should be the same for vista.
gonna have to watch out for patches against gcc-4.5.0 if something turns up ill provide a version with the fixes.
Loaden:
--- Quote from: thynson on April 27, 2010, 08:14:57 am ---Hi, all
First, pardon for my poor english.
I have succesfully built wxWidgets2.8.11 with MinGW-W64 GCC 4.5.0 cross compiler.
As gcc 4.5.0 changed its code-generation, now the code dllexport-inline function shall be generated in object files. However, in the headers of wxWidgets, there are so many dllexport-inline functions, so the object file could be as large as 1MB. In my 2GB RAM laptop, Windows Server 2008 R2, it runs with an end of out of memory exception while linking. So I got a cross compiler from MinGW-W64 project, and start building wxWidgets in Ubuntu Linux with 2GB SWAP space(finally it seems cost about 2.8GB memory for linking). This time I built it successful. And I added --disable-precompile-headers whlie configuration to reduce the size of those object files(cause if precompiled header is used, code for all dllexport-inline functions in header of wx would be generated in EACH OBJECT FILES), and edit the Makefile with flags --no-keep-memory , --reduce-memroy-overheads and --enable-runtime-pseudo-reloc-v2 passed to linker to avoid the situation out of memory and to ensure dll loaded properly.
By the way I tested this library in code::blocks (windows, of cause), compiling and linking went well. But the program could not run and with a 0x0000000c error. I know this problem could be solved by pass a flag of --enable-runtime-pseudo-reloc-v2 to the linker, and I tested this flags in command line and it works. But I don't know where to add this flag in project build option. I added the flag in 'Compiler settings - other options' tab, but it didn't work. I added the flag in 'Linker setting -Other linker option' box, it didn't work, too. So I think if this, flags couldn't be passed to the linker, is a bug of codeblocks, and plz fix it. Or it's a problem of my codeblocks.
And I also test 64bit-compiler, but 64-bits linker seems to link resource file wrongly(without .res file, the executable is linked properly, but add a resource file it could not run with an error of 0x0000007d)
--- End quote ---
I find the reason, When linking, we need this option too.
So, add these option BOTH compiler option and linker option.
Loaden:
Build wxWidgets 2.8.10 failed.
--- Quote ---luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
collect2: ld returned 5 exit status
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw28u.dll] Error 1
--- End quote ---
config:
--- Code: ---# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?= -static-libgcc -static-libstdc++
# Standard linker flags
LDFLAGS ?= -static-libgcc -static-libstdc++
--- End code ---
build:
--- Code: ---mingw32-make -f makefile.gcc LDFLAGS=-s SHARED=1 BUILD=release UNICODE=1 MONOLITHIC=1 OFFICIAL_BUILD=1 RUNTIME_LIBS=static
--- End code ---
Loaden:
If we have some DLL module, we can't use -static-libgcc both in DLL and EXE!
So, I change build config to:
--- Code: ---mingw32-make -f makefile.gcc CXXFLAGS="-Wl,--enable-auto-import" LDFLAGS="-Wl,--enable-auto-import -s" SHARED=1 BUILD=release UNICODE=1 MONOLITHIC=1 OFFICIAL_BUILD=1 RUNTIME_LIBS=static
--- End code ---
And, I build MinGW 4.5 on archlinux. I am test it on XPSP3, it's works well.
DOWNLOAD: http://qp-gcc.googlecode.com/files/mingw4.5.0.7z
And enable header's breakpoint now. :D
reckless:
might also be the only option at the moment to crossbuild wxwidgets on linux as theres no way known to increase the stack size for the commandline on windows.
linux does have that option :)
anyway it builds fine with precompiled wxwidgets so its not to much of a hazzle if you got that.
everything else works rather well i agree :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version