I have downloaded, compiled the project with gtest. Then I put gtest.framework in /Library/Frameworks. So, IDE highlight code correctly: code screenshot
But when compiling this error appears:
ld: library not found for -lgtest_main
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/Me/Library/Developer/Xcode/DerivedData/gtests-fgfrckirrlestcgfahvvtwdhgndr/Build/Products/Debug/gtests normal x86_64 cd /Users/Me/Desktop/Study/Projects/gtests 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/Me/Library/Developer/Xcode/DerivedData/gtests-fgfrckirrlestcgfahvvtwdhgndr/Build/Products/Debug -F/Users/Me/Library/Developer/Xcode/DerivedData/gtests-fgfrckirrlestcgfahvvtwdhgndr/Build/Products/Debug -F/Library/Frameworks -filelist /Users/Me/Library/Developer/Xcode/DerivedData/gtests-fgfrckirrlestcgfahvvtwdhgndr/Build/Intermediates/gtests.build/Debug/gtests.build/Objects-normal/x86_64/gtests.LinkFileList -mmacosx-version-min=10.10 -stdlib=libc++ -lgtest_main -framework gtest -lgtest -Xlinker -dependency_info -Xlinker /Users/Me/Library/Developer/Xcode/DerivedData/gtests-fgfrckirrlestcgfahvvtwdhgndr/Build/Intermediates/gtests.build/Debug/gtests.build/Objects-normal/x86_64/gtests_dependency_info.dat -o /Users/Me/Library/Developer/Xcode/DerivedData/gtests-fgfrckirrlestcgfahvvtwdhgndr/Build/Products/Debug/gtests
I guess, framework does contain only headers files and I also have to add libgtest_main.a and libgtest.a into some directory, but I haven't found any appropriate folder. What do I have to do?