Ok here some results of me trying to build wxWidgets on Windows 7 x64 (cmd line) :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
- wx 2.9-svn, mingw64-TDM, 64bit mode : Ok
- wx 2.8.10, mingw64-TDM, 32bit mode : Fails at link-time
- wx 2.8.10, mingw32-TDM, 32bit mode : Ok
The flags used were (here part of the config.gcc for the failed 2nd try):
# Standard flags for CC
CFLAGS ?= -pipe -march=core2 -m32 -floop-interchange -floop-strip-mine -floop-block
# Standard flags for C++
CXXFLAGS ?= -pipe -march=core2 -m32 -floop-interchange -floop-strip-mine -floop-block
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?=
# Standard linker flags
LDFLAGS ?= -Wl,--as-needed -m32
the -m32 switch was replaced by -m64 in the 1st try and by nothing in the 3rd.
Here the error message for the 2nd try:
[...]
g++ -shared -fPIC -o ..\..\lib\gcc_dll\wxmsw28u_gcc_custom.dll gcc_mswudll\monod
ll_dummy.o gcc_mswudll\monodll_version_rc.o gcc_mswudll\monodll_appbase.o gcc_ms
wudll\monodll_arcall.o gcc_mswudll\monodll_arcfind.o gcc_mswudll\monodll_archive.o [many more *.o files...]
Creating library file: ..\..\lib\gcc_dll\libwxmsw28u.a
c:/mingw64-tdm/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mi
ngw32/bin/ld.exe: i386:x86-64 architecture of input file `gcc_mswudll\monodll_ve
rsion_rc.o' is incompatible with i386 output
collect2: ld returned 1 exit status
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw28u_gcc_custom.dll] Error 1
Any hints at what I might have missed there or why Mingw64 can't build correctly wxWidgets in 32 bit mode ?
edit: I tried again with only minimal flags (ie. no graphite, no march, no as-needed, no pipe) but it still fails in the same way...