簡體   English   中英

Qt Creator不會構建一個最小的項目[-c第0行:git]

[英]Qt Creator doesn't build a minimal project [-c line 0: git]

我檢查了互聯網,但找不到任何有用的信息。

我剛剛從他們的主頁上安裝了最新的Qt。 然后,我啟動了Creator,並創建了一個“ qt控制台應用程序”。 我在項目設置過程中離開了所有標准配置,然后單擊了build,然后收到以下錯誤消息,我完全迷失了,因為它對我沒有任何意義:

程式碼

#include <QCoreApplication>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    return a.exec();
}

建造問題

"\Program Files (x86)\Git\bin\sh.exe":-1: Error: -c: line 0: syntax error near unexpected token `('

"\Program Files (x86)\Git\bin\sh.exe":-1: Error: -c: line 0: `/Program Files (x86)/Git/bin/sh.exe -c g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_CORE_LIB -I"..\CyberGloves" -I"." -I"..\..\..\..\Qt\5.4\mingw491_32\include" -I"..\..\..\..\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"..\..\..\..\Qt\5.4\mingw491_32\mkspecs\win32-g++"  -o debug\main.o ..\CyberGloves\main.cpp'

編譯器窗口這是編譯器窗口消息的摘錄

"/Program Files (x86)/Git/bin/sh.exe": -c: line 0: syntax error near unexpected token `('
"/Program Files (x86)/Git/bin/sh.exe": -c: line 0: `/Program Files (x86)/Git/bin/sh.exe -c g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_CORE_LIB -I"..\CyberGloves" -I"." -I"..\..\..\..\Qt\5.4\mingw491_32\include" -I"..\..\..\..\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"..\..\..\..\Qt\5.4\mingw491_32\mkspecs\win32-g++"  -o debug\main.o ..\CyberGloves\main.cpp'
Makefile.Debug:172: recipe for target 'debug/main.o' failed
mingw32-make[1]: *** [debug/main.o] Error 258
mingw32-make[1]: Leaving directory 'C:/Users/fihle/Documents/build-CyberGloves-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
11:46:15: Der Prozess "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" has been terminated with the return value 2.

好吧,我所看到的只是當我什至沒有碰到GIT時,他就為GIT煩惱(就像我說的那樣,我開箱即用)。

我正在Win7-64位計算機上使用QT社區版本。

我希望你們中的一些人有一個主意。

謝謝你的支持。

從%PATH%環境變量中刪除c:/ Program Files(x86)/ Git / bin,並確保QT安裝和您的項目目錄不在具有空格或任何特殊字符的任何目錄中。

暫無
暫無

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

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