使用gcc 4.6.0在mingw32上编译qt 4.7.3

时间:2011-07-18 23:27:01

标签: qt gcc mingw

我正在尝试使用gcc 4.6.0在mignw32上编译Qt 4.7.3。 运行./configure时出现以下错误:

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时

建议?

1 个答案:

答案 0 :(得分:0)

尝试./configure --help

ms-windows可能有一个标志,x86编译。

可能是这样的:

./ configure --target-os = mingw32

请注意 - os 参数名称可能不同,可选目标值 * 可能不同 * - 来自不同作者的脚本 - 您可能遇到的某些值可能是'win32','win32-386','x86-windows32'等。

看看是否

./ configure --help

不会给你一个清单......

您还可以将其输出重定向到文件,以便在您喜欢的编辑器中轻松阅读

./ configure --help> myconfighelp.txt

祝你好运!

相关问题