2011-07-18 55 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

祝你好運!