Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Cross Compiling linux-arm-gnueabi-g++ in Windows, with Cygwin
rafaelrabeloit last edited by rafaelrabeloit
I'm trying to cross compiling for linux-arm-gnueabi-g++ in windows, using cygwin. I have to use cygwin because of the project, and I can't avoid it. Also, I have to use Qt4.
But when I try to run
./configure -xplatform qws/linux-arm-gnueabi-g++I get the error:
/cygdrive/c/Qt/qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.cpp: In function ‘bool determineWinOsVersionPost8(OSVERSIONINFO*)’: /cygdrive/c/Qt/qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.cpp:1707:5: error: ‘QSystemLibrary’ was not declared in this scope QSystemLibrary versionLib(QLatin1String("version")); ^ /cygdrive/c/Qt/qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.cpp:1708:10: error: ‘versionLib’ was not declared in this scope if (!versionLib.load()) ^ /cygdrive/c/Qt/qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.cpp:1710:86: error: ‘versionLib’ was not declared in this scope PtrGetFileVersionInfoSizeW getFileVersionInfoSizeW = (PtrGetFileVersionInfoSizeW)versionLib.resolve("GetFileVersionInfoSizeW"); ^ Makefile:141: recipe for target 'qglobal.o' failed make: *** [qglobal.o] Error 1
I think I'm missing something silly, but I know very little about Qt build process to figure it out. Can someone help me?
_PIB last edited by _PIB
Make sure that you do not have any non-Cygwin versions of the tools which build system uses in your PATH. It looks to me that some program is fed with incorrect include paths. I could be sure if you pasted the full log).
Post the full build log (add -verbose to your configure command) for more help.
I also think that you should specify
-platform linux-g++because this is probably the most correct definition of Cygwin and it will probably detect it as Cygwin itself while this is probably not necessary (Cygwin is made to be largely compatible with Unix).
huangzhihua last edited by huangzhihua
There is a little bug in qglobal.cpp with Cygwin. This can be fixed as follow:
change line 1698 and 1774:
# ifndef Q_OS_WINCE
# if !defined(Q_OS_CYGWIN) && !defined(Q_OS_WINCE)