News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

problem with cross compile

Started by ahlongxp, July 27, 2006, 10:30:02 AM

Previous topic - Next topic

ahlongxp

I've installed mingw32 and succeeded in compling a "hello world".

but when I tried to compile a wxWidgets program in code:blocks
I got
:: === crosscompile, Debug ===
/usr/local/include/wx-2.6/wx/defs.h:2790: error: conflicting declaration 'typedef struct GtkWidget*WXWidget'
/usr/local/include/wx-2.6/wx/defs.h:2583: error: 'WXWidget' has a previous declaration as `typedef void*WXWidget'
/usr/local/include/wx-2.6/wx/defs.h:2790: error: declaration of `typedef struct GtkWidget*WXWidget'
/usr/local/include/wx-2.6/wx/defs.h:2583: error: conflicts with previous declaration `typedef void*WXWidget'
/usr/local/include/wx-2.6/wx/defs.h:2790: error: declaration of `typedef struct GtkWidget*WXWidget'
/usr/local/include/wx-2.6/wx/defs.h:2583: error: conflicts with previous declaration `typedef void*WXWidget'
/usr/local/include/wx-2.6/wx/filefn.h:322: error: zero width for bit-field `wxAssert_323::BadFileSizeType'
:: === Build finished: 7 errors, 0 warnings ===

I did exactly the same as http://forums.next.codeblocks.org/index.php?topic=3343.0 said.
ubuntu 8.04
wxWidget 2.8

ahlongxp

when I add the preprocessor #undef __WXGTK__
the error above disappeared and I got:

-------------- Build: Debug in crosscompile ---------------
Precompiling header: wx_pch.h
Compiling: app.cpp
Compiling: main.cpp
Linking console executable: bin/Debug/crosscompile
i586-mingw32msvc-g++: unrecognized option `-pthread'
/usr/lib/gcc/i586-mingw32msvc/3.4.4/../../../../i586-mingw32msvc/bin/ld:can not find  -lwx_gtk2u-2.6
collect2: ld returned 1 exit status
ubuntu 8.04
wxWidget 2.8