【问题标题】:Qt unexpected EOF while looking for matchingQt在寻找匹配时意外的EOF
【发布时间】:2014-12-11 08:59:39
【问题描述】:

我试图从 https://courses.cs.washington.edu/courses/cse576/14wi/Assignment1.htm 在 OS X 10.9.5 | Xcode 2 6.1 | Qt Creator 3.2.2(开源) 基于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

有什么建议吗?谢谢

【问题讨论】:

  • 我遇到了完全相同的问题。我的自动生成的 Makefile 似乎已损坏。这可能是一个 qmake 错误。

标签: c++ xcode macos qt


【解决方案1】:

我通过删除/Applications/Xcode 2.app 中的空格来修复它。棘手的部分是迫使 qmake 实现改变。

解决方案:

  1. 将“Xcode N.app”重命名为不带空格的名称(我删除了旧的 Xcode 安装并将“Xcode N.app”重命名为 /Applications/Xcode.app

  2. 运行sudo xcode-select --switch /Applications/Xcode.app(或您命名的任何其他名称)。

  3. 删除构建目录中名为 .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来删除文件。

  4. 构建。它现在应该可以工作了。

【讨论】:

  • @willsapgreen:你有机会尝试这个吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-01-19
  • 2020-12-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多