Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

library not found for -lPods-test clang when compiling unit tests

I am trying to run my unit tests and I get the below error:

    ld: library not found for -lPods-test clang: error: 
linker command failed with exit code 1 (use -v to see invocation)  

Ld /Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Products/Debug-iphonesimulator/MYIOSPROJProjectTests.xctest/MYIOSPROJProjectTests normal i386
    cd /Users/AUSER/Documents/Dev/MYIOSPROJProject/MYIOSPROJProject
    setenv IPHONEOS_DEPLOYMENT_TARGET 7.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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Products/Debug-iphonesimulator -F/Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Intermediates/MYIOSPROJProject.build/Debug-iphonesimulator/MYIOSPROJProjectTests.build/Objects-normal/i386/MYIOSPROJProjectTests.LinkFileList -bundle_loader /Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Products/Debug-iphonesimulator/MYIOSPROJProject.app/MYIOSPROJProject -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CFNetwork -framework CoreData -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework XCTest -framework UIKit -framework Foundation -lPods-test -lPods-MYIOSPROJProjectTests -Xlinker -dependency_info -Xlinker /Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Intermediates/MYIOSPROJProject.build/Debug-iphonesimulator/MYIOSPROJProjectTests.build/Objects-normal/i386/MYIOSPROJProjectTests_dependency_info.dat -o /Users/AUSER/Library/Developer/Xcode/DerivedData/MYIOSPROJProject-cmxbzcbzjfbvgncspsalqnjvlova/Build/Products/Debug-iphonesimulator/MYIOSPROJProjectTests.xctest/MYIOSPROJProjectTests

As someone who is new to IOS I legitimately have no idea where to even start. Any guidance would be appreciated (please be detailed as I am new).

Pod File:

platform :ios, 6.0
pod 'RestKit', '~> 0.20.0rc'

# Include optional Testing and Search components
pod 'RestKit/Testing', '~> 0.20.0rc'
pod 'RestKit/Search', '~> 0.20.0rc'


target :IOSProjectTests do
  pod 'Expecta',     '~> 0.2.3'   # expecta matchers
  # pod 'Specta',      '~> 0.1.11'  # specta bdd framework
end
like image 278
Aziz Avatar asked Jan 11 '23 10:01

Aziz


1 Answers

Deleted the -lPods-test file that was in the project and this fixed the issue.

This can be found in the Frameworks directory in the folder nav area

like image 124
Aziz Avatar answered Jan 22 '23 13:01

Aziz