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.
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__.
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__.
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:
-------------- 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
i hope any can help me :(
Regards,
Shadow.
I expect you are using the wrong wx-config.
Quote from: rjmyst3 on February 21, 2008, 03:59:59 AM
I expect you are using the wrong wx-config.
Hi,
and how i can modify that? :shock:
Regards,
Shadow.
shadow,
not to be rude, but it seems you need to understand more about normal compiling before you venture into cross-compiling.
wx-config is a build tool that generates the appropriate build flags based on your wxwidgets configuration.
it is invoked by code::blocks via a backticked expression in your build options.
you are using the one for the linux version, you need to find or build one for your cross-compiled wxwidgets libs, or determine what your build flags should be, and put them in the appropriate places instead.
Quote from: rjmyst3 on February 21, 2008, 04:49:36 AM
shadow,
not to be rude, but it seems you need to understand more about normal compiling before you venture into cross-compiling.
wx-config is a build tool that generates the appropriate build flags based on your wxwidgets configuration.
it is invoked by code::blocks via a backticked expression in your build options.
you are using the one for the linux version, you need to find or build one for your cross-compiled wxwidgets libs, or determine what your build flags should be, and put them in the appropriate places instead.
Hi,
well, i'm asking that, of course the project have wx-config in the build options, what i dont know how to do it, it's how to use my cross compiled libs in the project and not the linux lib.
if i use what you tell me, i need to change the config of wx-config or add some flag to link the libs what i want, but i dont know how to do it or what flags i need to use :s
Regards,
Shadow.
You should know where your compiled wxWidgets is.
Look in <path_to_your_wxMSW>/lib/wx/config there should be a shell-script for every wxWidgets version you compiled (e.g. unicode / ansi / debug etc.) called something like gtk2-unicode-release-2.8 (that's a wx-config for linux).
Use this with absolute paths instead of wx-config in the cross-compiling target of your project.
Remove the wx-config from your projects build options and put it into your build-targets options, so you can have the linux and the cross-build in one project.