簡體   English   中英

qt 4.8.3中的Qt資源系統錯誤

[英]Qt resource system bug in qt 4.8.3

我在 Windows 8 Pro x64 上使用 Qt 4.8.3 Open Source 和 Qt Creator 2.6.0。 我使用的編譯器是 MingW 4.4。

我有一個使用 Qt 4.8.0 構建的舊項目。 該項目有一個名為Resource.qrc的資源文件。 該項目在 Qt 4.8.0 中編譯得很好,我可以訪問我在資源文件中提到的所有內容。

但是在 Qt 4.8.3 中我無法編譯同一個項目。 Qt 4.8.3 似乎無法編譯資源文件。 這是試圖編譯Resource.qrc文件的輸出部分:

bin\rcc.exe -name Resource ..\Source\Resource.qrc -o release\qrc_Resource.cpp
mingw32-make[1]: Leaving directory `E:/Programs/Version Control/Sources/Spadetrump/Release'
process_begin: CreateProcess(NULL, bin\rcc.exe -name Resource ..\Source\Resource.qrc -o release\qrc_Resource.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[1]: *** [release/qrc_Resource.cpp] Error 2
mingw32-make: *** [release] Error 2
00:08:10: The process "C:\MingW\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Spadetrump (target: Desktop)
When executing step 'Make'

這是一個干凈的構建。 如果我使用完全相同的參數和絕對路徑執行rcc.exeqrc_Resource.cpp生成qrc_Resource.cpp

我用一個全新的 Qt GUI 應用程序嘗試了上述操作,結果是一樣的。

知道 Qt 4.8.3 有什么問題嗎?

使用相同的設置遇到與您完全相同的問題,期待對我來說是 xp 的 Windows 版本。 問題是無法找到 rcc.exe,因為該調用使用了不正確的路徑。

在 qt-projects 有一個關於這個問題的錯誤報告: https : //bugreports.qt.io/browse/QTBUG-27237

Daniel Frömmel 提出的解決方法對我有用:

1)打開你平台的qmake.conf(對我來說是C:\\Qt\\4.8.3\\mkspecs\\win32-g++)
2)搜索QMAKE_IDC
3) 在 QMAKE_IDC 行之后添加以下行: QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc.exe
4)保存文件和clsoe
5) 重新啟動所有開發工具並刪除所有自動生成的 Makefile
6)重新編譯

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM