How to compile WxWidgets in a 64bit windows 7 box? Error...

1,537 views
Skip to first unread message

imoveisn...@gmail.com

unread,
Jan 8, 2014, 9:44:37 AM1/8/14
to wx-u...@googlegroups.com
I can compile WxWidgets on mu old laptop (win Xp, 32 bit) but not in my 64 bit win 7 box

I downloaded minGW-w64 from http://tdragon.net/recentgcc/
I installed codeblocks and no problems
I downloaded wxWidgets-3.0.0 tar.gz and now I am truing to compil it as i ddid in the xp box.

mingw32-make.exe -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CFLAGS="-m32" CXXFLAGS="-m32" L
DFLAGS="-m32"

...
gw32/bin/ld.exe: i386:x86-64 architecture of input file `gcc_mswudll\monodll_ver
sion_rc.o' is incompatible with i386 output
collect2.exe: error: ld returned 1 exit status
makefile.gcc:5202: recipe for target '..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll'
failed
mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll] Error 1


Then I overwiten WINDRES using the one from xp box and
mingw32-make.exe -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CFLAGS="-m32" CXXFLAGS="-m32" L
DFLAGS="-m32"
c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-min
gw32/bin/ld.exe: i386:x86-64 architecture of input file `gcc_mswuddll\monodll_ve
rsion_rc.o' is incompatible with i386 output
collect2.exe: error: ld returned 1 exit status
makefile.gcc:5202: recipe for target '..\..\lib\gcc_dll\wxmsw30ud_gcc_custom.dll
' failed
mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw30ud_gcc_custom.dll] Error 1



Why is so hard to compile wxwidgets in a 64 bit box? Please, help me...

Imo

Rolf Ackermann

unread,
Jan 8, 2014, 9:54:27 AM1/8/14
to wx-u...@googlegroups.com

Hi Imo

I can compile WxWidgets on mu old laptop (win Xp, 32 bit) but not in my 64 bit win 7 box

> I downloaded minGW-w64 from http://tdragon.net/recentgcc/
> I installed codeblocks and no problems
> I downloaded wxWidgets-3.0.0 tar.gz and now I am truing to compil it as i ddid in the xp box.
>
> mingw32-make.exe -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CFLAGS="-m32" CXXFLAGS="-m32" L
> DFLAGS="-m32"
Do you try to compile 32Bit or 64Bit (output)? The "-m32" produces 32bit object/library/dll's. If so you have to add the windres parameter for 32bit (--target=pe-i386). The problem is the wx.manifest file which is different for 32bit and 64bit applications.
 
Best regards
Rolf (aka spieler67)

 

Xavier Perrissoud

unread,
Jan 8, 2014, 10:02:42 AM1/8/14
to wx-u...@googlegroups.com, ro...@weon.ch
Hi.

Here is the command line I've used to build a 32 bits version of the libs using the 64 bits compiler (as it seems to be want you want to do) :
 
mingw32-make.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 USE_WEBVIEW=1 CXXFLAGS="-m32 -fno-keep-inline-dllexport" CPP="gcc -E -D_M_IX86" LDFLAGS="-m32" CPPFLAGS="-m32" WINDRES="windres --use-temp-file -F pe-i386"

Regards
Xav'

imoveisn...@gmail.com

unread,
Jan 8, 2014, 10:02:57 AM1/8/14
to wx-u...@googlegroups.com
I restored the original windres.exe and did:

C:\Users\ncosta\Desktop\wxWidgets-3.0.0\build\msw>mingw32-make.exe -f makefile.g
cc BUILD=debug SHARED=1 MONOLITHIC=1 UNICODE=1 CFLAGS="-m32" CXXFLAGS="-m32" LDF
LAGS="-m32" --target=pe-i386 


It says this:
mingw32-make.exe: unrecognized option '--target=pe-i386'

imoveisn...@gmail.com

unread,
Jan 8, 2014, 10:08:39 AM1/8/14
to wx-u...@googlegroups.com
I am now trying...

mingw32-make.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 USE_WEBVIEW=1 CXXFLAGS="-m32 -fno-keep-inline-dllexport" CPP="gcc -E -D_M_IX86" LDFLAGS="-m32" CPPFLAGS="-m32" WINDRES="windres --use-temp-file -F pe-i386"


Thanks


On Wednesday, January 8, 2014 2:44:37 PM UTC, imoveisn...@gmail.com wrote:

imoveisn...@gmail.com

unread,
Jan 8, 2014, 10:10:48 AM1/8/14
to wx-u...@googlegroups.com
Thank you Xavier, that is what I was looking for!! ;-)

Is compilling now... Hope no error at the end...

Imo



On Wednesday, January 8, 2014 2:44:37 PM UTC, imoveisn...@gmail.com wrote:

imoveisn...@gmail.com

unread,
Jan 8, 2014, 10:19:08 AM1/8/14
to wx-u...@googlegroups.com
How sad...

I did:

mingw32-make.exe -f makefile.gcc clean

and

mingw32-make.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 USE_WEBVIEW=1 CXXFLAGS="-m32 -fno-keep-inline-dllexport" CPP="gcc -E -D_M_IX86" LDFLAGS="-m32" CPPFLAGS="-m32" WINDRES="windres --use-temp-file -F pe-i386"

And i got


c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-min
gw32/bin/ld.exe: i386:x86-64 architecture of input file `gcc_mswudll\monodll_ver
sion_rc.o' is incompatible with i386 output
collect2.exe: error: ld returned 1 exit status
makefile.gcc:5202: recipe for target '..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll'
 failed
mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll] Error 1


Imo


On Wednesday, January 8, 2014 2:44:37 PM UTC, imoveisn...@gmail.com wrote:

Fabian Cenedese

unread,
Jan 13, 2014, 3:15:42 AM1/13/14
to wx-u...@googlegroups.com
At 16:19 08. 01. 2014, imoveisn...@gmail.com wrote:
>How sad...
>
>I did:
>
>mingw32-make.exe -f makefile.gcc clean
>
>and
>
>mingw32-make.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 USE_WEBVIEW=1 CXXFLAGS="-m32 -fno-keep-inline-dllexport" CPP="gcc -E -D_M_IX86" LDFLAGS="-m32" CPPFLAGS="-m32" WINDRES="windres --use-temp-file -F pe-i386"
>
>And i got
>
>
>c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-min
>gw32/bin/ld.exe: i386:x86-64 architecture of input file `gcc_mswudll\monodll_ver
>sion_rc.o' is incompatible with i386 output
>collect2.exe: error: ld returned 1 exit status
>makefile.gcc:5202: recipe for target '..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll'
> failed
>mingw32-make.exe: *** [..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll] Error 1

Did you completely delete your build/output directory? This might just be a
leftover from the previous tries. If this error also shows up on a completely
fresh tree then I don't know.

bye Fabi

Reply all
Reply to author
Forward
0 new messages