User forums > Using Code::Blocks
problems with cross compiling
shadow_of__soul:
Hi,
i follow the instruction to configure codeblocks for cross compiling, and all go fine but i have some problems.
when i trying to compile the example code of the wxWidget this throw this errors:
/usr/include/wx-2.8/wx/defs.h:2806: error: conflicting declaration 'typedef struct GtkWidget*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2597: error: 'WXWidget' has a previous declaration as `typedef void*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2806: error: declaration of `typedef struct GtkWidget*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2597: error: conflicts with previous declaration `typedef void*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2806: error: declaration of `typedef struct GtkWidget*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2597: error: conflicts with previous declaration `typedef void*WXWidget'
and other of the same type,how i see it, it's why it's using the linux lib for the include and not the windows libs (i have the precompiled pack of the wxWidget).
any know how i can change the path to include the files from the pre-compiled pack for windows and not the linux lib's?
Thanks for your help :)
Regards,
Shadow.
rjmyst3:
These errors are not from the libs - it hasn't started linking yet.
You have defined __WXGTK__ somewhere, I just had the same problem yesterday.
If you are cross-compiling, you want __WXMSW__, not __WXGTK__.
shadow_of__soul:
--- Quote from: rjmyst3 on February 21, 2008, 03:09:28 am ---These errors are not from the libs - it hasn't started linking yet.
You have defined __WXGTK__ somewhere, I just had the same problem yesterday.
If you are cross-compiling, you want __WXMSW__, not __WXGTK__.
--- End quote ---
Hi,
surely that it's the problem, but i think it's why i'm using the linux lib's, why the code what i'm trying to compile it's the code created by the template of wxWidget (when you create a new project) whiteout modification.
to make more clear i include the log's of the build:
--- Code: ----------------- Build: Debug in client_app ---------------
Compiling: GUIFrame.cpp
i586-mingw32msvc-g++: unrecognized option `-pthread'
In file included from /usr/include/wx-2.8/wx/platform.h:279,
from /usr/include/wx-2.8/wx/defs.h:21,
from /usr/include/wx-2.8/wx/wxprec.h:13,
from /home/shadowdesk/work/backup app c++/client_app/GUIFrame.cpp:8:
/usr/include/wx-2.8/wx/chkconf.h:1817:9: #error "wxClipboard requires wxDataObject"
In file included from /usr/include/wx-2.8/wx/wxprec.h:13,
from /home/shadowdesk/work/backup app c++/client_app/GUIFrame.cpp:8:
/usr/include/wx-2.8/wx/defs.h:2806: error: conflicting declaration 'typedef struct GtkWidget*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2597: error: 'WXWidget' has a previous declaration as `typedef void*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2806: error: declaration of `typedef struct GtkWidget*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2597: error: conflicts with previous declaration `typedef void*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2806: error: declaration of `typedef struct GtkWidget*WXWidget'
/usr/include/wx-2.8/wx/defs.h:2597: error: conflicts with previous declaration `typedef void*WXWidget'
In file included from /usr/include/wx-2.8/wx/utils.h:21,
from /usr/include/wx-2.8/wx/cursor.h:41,
from /usr/include/wx-2.8/wx/event.h:22,
from /usr/include/wx-2.8/wx/wx.h:25,
from /home/shadowdesk/work/backup app c++/client_app/GUIFrame.cpp:15:
/usr/include/wx-2.8/wx/filefn.h:388: error: zero width for bit-field `wxAssert_389::BadFileSizeType'
In file included from /usr/include/wx-2.8/wx/scrolwin.h:255,
from /usr/include/wx-2.8/wx/wx.h:84,
from /home/shadowdesk/work/backup app c++/client_app/GUIFrame.cpp:15:
/usr/include/wx-2.8/wx/gtk/scrolwin.h: In member function `void wxScrollHelperNative::DoAdjustHScrollbar(int, int)':
/usr/include/wx-2.8/wx/gtk/scrolwin.h:46: error: 'class wxWindow' has no member named 'm_scrollBar'
/usr/include/wx-2.8/wx/gtk/scrolwin.h:46: error: `ScrollDir_Horz' is not a member of `wxWindow'
/usr/include/wx-2.8/wx/gtk/scrolwin.h: In member function `void wxScrollHelperNative::DoAdjustVScrollbar(int, int)':
/usr/include/wx-2.8/wx/gtk/scrolwin.h:56: error: 'class wxWindow' has no member named 'm_scrollBar'
/usr/include/wx-2.8/wx/gtk/scrolwin.h:56: error: `ScrollDir_Vert' is not a member of `wxWindow'
Process terminated with status 1 (0 minutes, 8 seconds)
12 errors, 0 warnings
--- End code ---
i hope any can help me :(
Regards,
Shadow.
rjmyst3:
I expect you are using the wrong wx-config.
shadow_of__soul:
--- Quote from: rjmyst3 on February 21, 2008, 03:59:59 am ---I expect you are using the wrong wx-config.
--- End quote ---
Hi,
and how i can modify that? :shock:
Regards,
Shadow.
Navigation
[0] Message Index
[#] Next page
Go to full version