【发布时间】:2011-07-18 23:27:01
【问题描述】:
我正在尝试使用 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时
建议?
【问题讨论】:
-
如果您在 Windows 上,您是否有理由不想只使用二进制文件??
-
要开发 Qt 应用程序我必须使用 Qt SDK 附带的 gcc,它非常旧(4.4.0)并且缺少 C++0x