Author Topic: problem with cross compile  (Read 4417 times)

Offline ahlongxp

  • Multiple posting newcomer
  • *
  • Posts: 22
problem with cross compile
« 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.
ubuntu 8.04
wxWidget 2.8

Offline ahlongxp

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: problem with cross compile
« Reply #1 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
ubuntu 8.04
wxWidget 2.8