0

I'm getting the following error in Xcode, and after looking online for a while I could not find the solution. I am creating an object Grid which uses a generic, but I cannot initiate it without getting this error. Any help or insight would be greatly appreciated.

Ld "/Users/IQ/Library/Developer/Xcode/DerivedData/IQ_Maps-ghefraspxyhtuudxovbglequskej/Build/Products/Debug-iphonesimulator/IQ Maps.app/IQ Maps" normal i386 cd "/Users/IQ/Documents/IQ Labs/IQ Maps" setenv IPHONEOS_DEPLOYMENT_TARGET 6.0 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/IQ/Library/Developer/Xcode/DerivedData/IQ_Maps-ghefraspxyhtuudxovbglequskej/Build/Products/Debug-iphonesimulator -F/Users/IQ/Library/Developer/Xcode/DerivedData/IQ_Maps-ghefraspxyhtuudxovbglequskej/Build/Products/Debug-iphonesimulator "-F/Users/IQ/Documents/IQ Labs/IQ Maps/../../../Desktop" "-F/Users/IQ/Documents/IQ Labs/IQ Maps/.." "-F/Users/IQ/Documents/IQ Labs/IQ Maps/../../Desktop" "-F/Users/IQ/Documents/IQ Labs/IQ Maps" -filelist "/Users/IQ/Library/Developer/Xcode/DerivedData/IQ_Maps-ghefraspxyhtuudxovbglequskej/Build/Intermediates/IQ Maps.build/Debug-iphonesimulator/IQ Maps.build/Objects-normal/i386/IQ Maps.LinkFileList" -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -stdlib=libc++ -mios-simulator-version-min=6.0 -framework opencv2 -framework AssetsLibrary -framework QuartzCore -framework CoreMedia -framework ImageIO -framework CoreVideo -framework CoreLocation -framework AVFoundation -framework CoreMotion -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/IQ/Library/Developer/Xcode/DerivedData/IQ_Maps-ghefraspxyhtuudxovbglequskej/Build/Products/Debug-iphonesimulator/IQ Maps.app/IQ Maps"

ld: warning: directory not found for option '-F/Users/IQ/Documents/IQ Labs/IQ Maps/../../Desktop' Undefined symbols for architecture i386: "Grid::Grid(int, int)", referenced from: Tracker::Tracker() in Tracker.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

4

2 回答 2

0

看起来类文件库已从项目外部正确链接。

它无法链接到项目构建设置链接器部分中提到的那个库/类路径。

ld:警告:找不到选项'-F/Users/IQ/Documents/IQ Labs/IQ Maps/../../Desktop 的目录

警告:表明链接器无法在指定位置找到 lib/class 的位置/路径。

删除与该库/类相关的项目构建设置的链接器部分的链接器路径。

现在再次将这些库或类添加到您的项目中。确保它应该只显示您指定的构建设置中的链接器路径。再次构建/运行。

我希望它能帮助你解决这个问题。

于 2013-05-26T08:03:44.083 回答
0

为什么在使用模板时会出现“未解析的外部符号”错误?

这是重复的,我什至没有意识到。对于那个很抱歉。感谢您的帮助,但问题在于我如何使用泛型/模板类。

于 2013-05-27T18:02:27.887 回答