User forums > Using Code::Blocks
Howto - Cross Compiling in Linux using MingW32
Ganbito:
Sorry. It's the first time I read about global settings in the project. :oops: Just now I only know settings of the targets.
Thank you for your effort. Now it works.
Jenna:
--- Quote from: Ganbito on August 16, 2008, 07:05:28 pm ---Sorry. It's the first time I read about global settings in the project. :oops: Just now I only know settings of the targets.
Thank you for your effort. Now it works.
--- End quote ---
Nice to hear.
I think the expression "Global settings of the project" can be misleading.
I will think about a better phrase for it.
Ganbito:
From jens' wiki-article:
--- Quote ---Until now I haven't been able to make a cross-compiled program run on MS Windows if I did not use the static libraries.
--- End quote ---
I can!!!
I build my sample application with shared wxMSW (from your repository) and I test it on 64bit Windows Vista (I have no XP available today, perhaps tomorrow...). It start to ask for some (two for the sample) .dll's that can be found in /usr/i586-mingw32msvc/lib, I put them in the same directory of my .exe and it works.
As you build wxMSW with multiple .dll's, depending on the application, the application will require different .dll's, making it bad to distribute so I try building an monolithic library adding --enable-monolithic to my ./configure command. As it was a test I installed this monolithic version of the default location /usr/local/for not corrupting your wxMSW if it don't work. Then I build my sample project with this shared library and get the .dll from /usr/local/lib and it works right on my 64bit Vista with the advantage of one .dll needed for all the cases.
era506:
Hi!!
I'm trying to build and run a wxWidgets test project but I'm getting a lot o errors. I've followed the wiki howto step by step and also tried some things I read above in this thread but I still can't build and/or run my wxWidgets test app. Can someone help me?
Here is the build log:
--- Code: ----------------- Build: Release in Prueba2 ---------------
Compiling: Prueba2App.cpp
i586-mingw32msvc-g++: unrecognized option '-pthread'
In file included from /usr/include/wx-2.8/wx/platform.h:293,
from /usr/include/wx-2.8/wx/defs.h:21,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/era506/Desktop/Prueba2/Prueba2App.h:13,
from /home/era506/Desktop/Prueba2/Prueba2App.cpp:10:
/usr/include/wx-2.8/wx/chkconf.h:1817:9: error: #error "wxClipboard requires wxDataObject"
In file included from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/era506/Desktop/Prueba2/Prueba2App.h:13,
from /home/era506/Desktop/Prueba2/Prueba2App.cpp:10:
/usr/include/wx-2.8/wx/defs.h:2820: error: conflicting declaration ‘typedef struct GtkWidget* WXWidget’
/usr/include/wx-2.8/wx/defs.h:2611: error: ‘WXWidget’ has a previous declaration as ‘typedef void* WXWidget’
In file included from /usr/include/wx-2.8/wx/clntdata.h:17,
from /usr/include/wx-2.8/wx/event.h:18,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/era506/Desktop/Prueba2/Prueba2App.h:13,
from /home/era506/Desktop/Prueba2/Prueba2App.cpp:10:
/usr/include/wx-2.8/wx/hashmap.h: In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:
/usr/include/wx-2.8/wx/hashmap.h:714: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:18,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/era506/Desktop/Prueba2/Prueba2App.h:13,
from /home/era506/Desktop/Prueba2/Prueba2App.cpp:10:
/usr/include/wx-2.8/wx/clntdata.h: In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/clntdata.h:20: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/clntdata.h:25: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:21,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/era506/Desktop/Prueba2/Prueba2App.h:13,
from /home/era506/Desktop/Prueba2/Prueba2App.cpp:10:
/usr/include/wx-2.8/wx/gdicmn.h: In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/gdicmn.h:544: warning: dereferencing type-punned pointer will break strict-aliasing rules
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/app.h:20,
from /home/era506/Desktop/Prueba2/Prueba2App.h:13,
from /home/era506/Desktop/Prueba2/Prueba2App.cpp:10:
/usr/include/wx-2.8/wx/filefn.h: At global scope:
/usr/include/wx-2.8/wx/filefn.h:398: error: zero width for bit-field ‘wxAssert_399::BadFileSizeType’
In file included from /home/era506/Desktop/Prueba2/Prueba2App.cpp:14:
/usr/include/wx-2.8/wx/image.h: In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:
/usr/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
Process terminated with status 1 (0 minutes, 2 seconds)
4 errors, 5 warnings
--- End code ---
Jenna:
--- Quote from: era506 on September 24, 2008, 02:10:42 am ---I've followed the wiki howto step by step and also tried some things I read above in this thread but I still can't build and/or run my wxWidgets test app.
--- End quote ---
You did not follow my howto step by step, because you are still using linux parameters for cross-compiling, that can't work.
Read this carefully.
Please post the full commandline next time.
How to turn on full comandline logging:
Change "Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab) -> Compiler logging" to "Full commandline".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version