繁体   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