Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: ahlongxp on July 27, 2006, 10:30:02 am

Title: problem with cross compile
Post by: ahlongxp on July 27, 2006, 10:30:02 am
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.codeblocks.org/index.php?topic=3343.0 said.
Title: Re: problem with cross compile
Post by: ahlongxp on July 27, 2006, 11:02:03 am
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