Using the mingw cross compiler
Angus Leeming
leeming at lyx.org
Wed Apr 20 23:10:51 CEST 2005
Oooooooohhhhhh, so close!
Ralf's prescription almost works although I changed the configure step to
$ export QMAKESPEC=win32-g++-cross
$ ./configure -no-cups -platform win32-g++-cross -share
with a little hacking of the i586-mingw32msvc- names to something correct
for my versions of the mingw cross compiler.
(I found I had to also hack the <float.h> files in my mingw headers, but
that's another story and it was a pretty trivial hack...)
All goes well with the compilation up to the point where the OS-specific
source files come to be compiled. I find that I'm compiling the unix
versions rather than the win32 ones of this section of qmake/qmake.pro
win32: {
SOURCES += \
../src/tools/qfile_win.cpp \
../src/tools/qfileinfo_win.cpp \
../src/tools/qdir_win.cpp \
../src/tools/qlibrary_win.cpp \
../src/tools/qsettings_win.cpp
}
unix: {
SOURCES += \
../src/tools/qfile_unix.cpp \
../src/tools/qfileinfo_unix.cpp \
../src/tools/qdir_unix.cpp \
../src/tools/qlibrary_unix.cpp \
}
I guess I need to pass the '-win32' option to qmake, presumably by adding a
single line to mkspecs/win32-g++-cross/qmake.conf, no?
I find that invoking qmake in the configure script as
(cd $outpath/qmake && qmake -win32 -spec ${relpath}/mkspecs/$PLATFORM)
does *not* work.
Any clues?
Regards,
Angus
Current errors:
i386-mingw32-g++ -c -O2 -fno-exceptions -fno-rtti -DUNICODE
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL
-DQT_NO_STL -DQT_NO_COMPRESS -DHAVE_QCONFIG_CPP
-I"/usr/local/i386-mingw32/include" -I"." -I"generators"
-I"generators/unix" -I"generators/win32" -I"generators/mac" -I"../include"
-I"../include/private" -I"../include/qmake" -I"/include"
-I"/home/angus/mingw-xcompile/qt3/mkspecs/win32-g++-cross" -o
tmp/qfileinfo_unix.o ../src/tools/qfileinfo_unix.cpp
../src/tools/qfileinfo_unix.cpp: In member function `bool
QFileInfo::isSymLink() const':
../src/tools/qfileinfo_unix.cpp:99: error: `symLink' undeclared (first use
thisfunction)
../src/tools/qfileinfo_unix.cpp:99: error: (Each undeclared identifier is
reported only once for each function it appears in.)
../src/tools/qfileinfo_unix.cpp: In member function `QString
QFileInfo::owner()const':
../src/tools/qfileinfo_unix.cpp:173: error: `passwd' undeclared (first use
thisfunction)
../src/tools/qfileinfo_unix.cpp:173: error: `pw' undeclared (first use this
function)
../src/tools/qfileinfo_unix.cpp:173: error: `getpwuid' undeclared (first
use this function)
../src/tools/qfileinfo_unix.cpp: In member function `QString
QFileInfo::group()const':
../src/tools/qfileinfo_unix.cpp:210: error: `getgrgid' undeclared (first
use thi
etc
More information about the kde-cygwin
mailing list