我已经下载了Qt SDK,并尝试使用Qt Creator开始使用我的第一个Qt应用程序。

使用开始启动画面中的向导,我选择了“Qt4 Gui Application”。它为我整理了一个小项目。

当我尝试构建该项目时(不做任何更改),我遇到了构建错误:

Running build steps for project BlockGame...

Configuration unchanged, skipping QMake step.

Starting: /usr/bin/make -w 

make: Entering directory `/Users/mikemorton/BlockGame'

g++ -headerpad_max_install_names -o BlockGame.app/Contents/MacOS/BlockGame main.o mainwindow.o moc_mainwindow.o -F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework Carbon -framework AppKit -framework QtCore -lz -lm -framework ApplicationServices

/usr/bin/ld: /Library/Frameworks/QtGui.framework/QtGui load command 6 unknown cmd field

/usr/bin/ld: /Library/Frameworks/QtCore.framework/QtCore load command 5 unknown cmd field

collect2: ld returned 1 exit status

make: *** [BlockGame.app/Contents/MacOS/BlockGame] Error 1

make: Leaving directory `/Users/mikemorton/BlockGame'

Exited with code 2.

Error while building project BlockGame

When executing build step 'Make'

我不知道为什么在我没有更改默认项目中的任何内容时会出现此错误。我不是试图使用Qt Creator从命令行构建。任何帮助表示赞赏。

有帮助吗?

解决方案

我设法通过重新安装开发人员工具来解决这个问题。我想有些东西搞砸了我的ld版本。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top