prelimary mingw cross compile instructions

Daniel Verite daniel at manitou-mail.org
Sat Apr 9 18:37:52 CEST 2005


	Ralf Habacker wrote:

> search for AUTOTHREAD in configure. There you find a message that 
> qmake.conf / QMAKE_LIBS_THREAD has to be set to the threading libary 

Then I've added 
QMAKE_LIBS_THREAD =
into mkspecs/win32-g++/qmake.conf
then reconfigured, and indeed that fixes the mt- problem. Cool.

Now about libqtmain that isn't built.
A compilation failure is reported on qtcrtentrypoint.cpp pretending that
_fpreset() is not declared.
Actually it is declared in /usr/i586-mingw32msvc/float.h but the preprocessor
picks up /usr/lib/gcc-lib/i486-linux/3.3.5/include/float.h instead.
I believe that the first one would be supposed to include the latter (through
include_next) but this does not happen since the include path is set the other
way round. Looks like a configuration issue for the debian mingw32 package.

Anyway, manually adding extern "C" { void _fpreset(); } in qtcrtentrypoint.cpp
makes it compilable.

There are also the dos commands (copy, del, move) that make will fail to
launch.This can be fixed by editing  mkspecs/win32-g++/qmake.conf:

QMAKE_COPY              = cp
QMAKE_MOVE              = mv
QMAKE_DEL_FILE          = rm

Finally, I've noted that for me, the examples are compiled as libraries instead
of executables. For instance, for aclock, qmake generates a TARGET=aclock.dll
along with this link command:

i586-mingw32msvc-g++ -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-reloc -mthreads -Wl,-s -Wl,-subsystem,windows
-shared -Wl,--export-all-symbols -Wl,--out-implib,libaclock.a -o
aclock.dll .obj/release-shared-mt/aclock.o .obj/release-shared-mt/main.o .obj/
release-shared-mt/moc_aclock.o -L"/home/daniel/src/qt-3/lib" -lqtmain -lqt-mt
-lopengl32 -lglu32 -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32
-lole32 -loleaut32 -luuid -limm32 -lwinmm -lwsock32 -lwinspool

That I couldn't figure out at all. It would be of interest for people that would
want to cross-compile their applications in addition to Qt itself.

Regards,

-- 
 Daniel
 PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org



More information about the kde-cygwin mailing list