2011-07-18 54 views
0

我想用gcc 4.6.0在mignw32上编译Qt 4.7.3。 我在运行./configure时收到以下错误:在gingw32上编译qt 4.7.3用gcc 4.6.0

In file included from C:/work/qt-gcc-4.6.0/include/QtCore/private/qcore_unix_p.h:1:0, 
       from C:/work/qt-gcc-4.6.0/src/corelib/io/qfsfileengine_unix.cpp:45: 
C:/work/qt-gcc-4.6.0/include/QtCore/private/../../../src/corelib/kernel/qcore_unix_p.h:59:3: error: #error "qcore_unix_p.h included on a non-Unix system" 

奇怪的是,我运行Windows 7,并试图包括。 也在Makefile中使用qfsfileengine_unix和qfsfileengine_iterator_unix,而不是qfsfileengine_win和qfsfileengine_iterator_win。

如果我改变Makefile使用Windows的那些,我得到以下错误(该文件不存在):

In file included from C:/work/qt-gcc-4.6.0/include/QtCore/../../src/corelib/global/qglobal.h:62:0, 
       from C:/work/qt-gcc-4.6.0/include/QtCore/qglobal.h:1, 
       from C:/work/qt-gcc-4.6.0/mkspecs/win32-g++/qplatformdefs.h:53, 
       from C:/work/qt-gcc-4.6.0/src/corelib/io/qfsfileengine_win.cpp:43: 
C:/work/qt-gcc-4.6.0/include/QtCore/qconfig.h:1:46: fatal error: ../../src/corelib/global/qconfig.h: No such file or directory 
compilation terminated. 

当编译/qt/src/corelib/io/qfsfileengine_win.cpp

对此提出建议?

+0

是否有你不想使用二进制文件的原因,如果你在Windows? – tylerthemiler

+0

要开发Qt应用程序,我必须使用Qt SDK附带的gcc,它很旧(4.4.0),缺少C++ 0x – joca

回答

0

尝试使用./configure --help

有可能是对微软Windows,X86汇编的标志。

这可能是这样的:

的./configure --target-OS = mingw32的

请记住 - 操作系统参数名称可能会有所不同,而可选择的目标值 * 可能会有所不同 * - 与来自不同作者的脚本 - 你可能会遇到一些值可能是“win32的”,“win32-386”,“86-WINDOWS32”等

看看

的./configure --help

不会给你一个列表...

您也可以重定向输出到一个文件中,为方便阅读你喜欢的编辑器,

。/configure --help> myconfighelp.txt

祝你好运!