0
votes

I follow the instruction and the ans to setup gtest for xcode. But it still doesn't work and i got the error below:

Ld /Users/xiaxin/Library/Developer/Xcode/DerivedData/Calculator-cchvzojufxzxgfdevhkifabakxpl/Build/Products/Debug/Tests normal x86_64 cd /Users/xiaxin/Documents/xCode/Calculator export MACOSX_DEPLOYMENT_TARGET=10.10 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/xiaxin/Library/Developer/Xcode/DerivedData/Calculator-cchvzojufxzxgfdevhkifabakxpl/Build/Products/Debug -L/usr/local/lib -F/Users/xiaxin/Library/Developer/Xcode/DerivedData/Calculator-cchvzojufxzxgfdevhkifabakxpl/Build/Products/Debug -filelist /Users/xiaxin/Library/Developer/Xcode/DerivedData/Calculator-cchvzojufxzxgfdevhkifabakxpl/Build/Intermediates/Calculator.build/Debug/Tests.build/Objects-normal/x86_64/Tests.LinkFileList -mmacosx-version-min=10.10 -lgtest -stdlib=libc++ -framework gtest -Xlinker -dependency_info -Xlinker /Users/xiaxin/Library/Developer/Xcode/DerivedData/Calculator-cchvzojufxzxgfdevhkifabakxpl/Build/Intermediates/Calculator.build/Debug/Tests.build/Objects-normal/x86_64/Tests_dependency_info.dat -o /Users/xiaxin/Library/Developer/Xcode/DerivedData/Calculator-cchvzojufxzxgfdevhkifabakxpl/Build/Products/Debug/Tests

ld: framework not found gtest clang: error: linker command failed with exit code 1 (use -v to see invocation)

1

1 Answers

0
votes

You need to add the GTest library to your library path. You can accomplish this on the commandline by setting -L/path/to/gtest