Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Cross compiling with mingw
Cross compiling with mingw [message #46269] Mon, 04 April 2016 21:14
tomas is currently offline  tomas
Messages: 6
Registered: February 2016
Promising Member

I have been experimenting a bit with cross compiling the examples using mingw under linux.
It works quite well but I have run in to some issues. I saw a recent post from Novo who also had similar experiences.

1) Header files
The mingw Windows header files are all named in lower case.
This is ok on Windows since Windows in most cases is case insensitive but most linux file systems are case sensitive which means that:
#include <ShellApi.h>
won't work since the mingw file is named shellapi.h
The simplest solution would be to use lower case names when including Windows headers, this should work on both linux and Windows with both mingw and Visual Studio.
I have been poking around in the Qt sources and lower case windows includes seems how they are doing it also:
http:// code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qt_win dows.h
http:// code.qt.io/cgit/qt/qtbase.git/tree/src/network/kernel/qnetwo rkinterface_win.cpp

2) flagWIN32
This flag does not get set when using mingw on linux resulting in problems when including png.h for instance.
Adding the flag to the "Common options" in the build configuration solves the problem for now.

3) Linking
The build system gets a bit confused and tries to use the linux libraries instead of the Windows ones when cross compiling with mingw.

Best regards
Read Message
Previous Topic: Eye Care example topmost not working.
Next Topic: Problems compiling theide with mingw (help needed)
Goto Forum:

Current Time: Thu Jul 18 07:14:07 CEST 2024

Total time taken to generate the page: 0.02049 seconds