我试图从中运行该项目 https://courses.cs.washington.edu/courses/cse576/14wi/Assignment1.htm 上 OS X 10.9.5 | Xcode 2 6.1 | Qt Creator 3.2.2(opensource)基于Qt 5.3.2
但得到以下错误
> /Users/MyName/Qt/5.3/clang_64/bin/qmake -spec macx-clang CONFIG+=debug
> CONFIG+=x86_64 -o Makefile ../code/ImageStitcher.pro
> /Applications/Xcode
> 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
> -c -pipe -g -isysroot /Applications/Xcode 2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
> -mFile Doesn't Exist, Will Create: /Applications/Xcode Invalid Arguments -version-min=10.6 -Wall -W -fPIE -DQT_WIDGETS_LIB
> -DQT_GUI_LIB -DQT_CORE_LIB -I../../../Qt/5.3/clang_64/mkspecs/macx-clang -I../code -I../../../Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers -I../../../Qt/5.3/clang_64/lib/QtGui.framework/Versions/5/Headers -I../../../Qt/5.3/clang_64/lib/QtCore.framework/Versions/5/Headers -I. -I/Applications/Xcode -I2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers
> -I/Applications/Xcode -I2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers/
> -I. -I. -F/Users/MyName/Qt/5.3/clang_64/lib -o main.o ../code/main.cpp /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
> /bin/sh: -c: line 1: syntax error: unexpected end of file make: ***
> [main.o] Error 2 22:13:50: The process "/usr/bin/make" exited with
> code 2. Error while building/deploying project ImageStitcher (kit:
> Desktop Qt 5.3 clang 64bit) When executing step "Make"
我已经改变了
!host_build:QMAKE_MAC_SDK = macosx10.9
qdevice.pri
有什么建议吗?感谢
答案 0 :(得分:3)
我通过删除/Applications/Xcode 2.app
中的空格来修复它。棘手的部分是迫使qmake实现变革。
解决方案:
将“Xcode N.app”重命名为没有空格的内容(我删除了旧的Xcode安装并将我的“Xcode N.app”重命名为/Applications/Xcode.app
)
运行sudo xcode-select --switch /Applications/Xcode.app
(或其他任何您命名的内容)。
删除构建目录中名为.qmake.stash
的文件。我的项目位于~/test/
,我的构建目录为~/build-test-Desktop_Qt_5_3_clang_64bit-Debug/
,因此我运行了rm -f ~/build-test-Desktop_Qt_5_3_clang_64bit-Debug/.qmake.stash
来删除该文件。
生成。它现在应该可以工作了。