Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild failure clang:error no such file or directory:

Having a problem when building with xcodebuild. My project/app builds fine with the Xcode - gui. It simply isn't finding/building the libcryptopp library which is part of the build process.

The error is:

clang: error: no such file or directory: '/Users/builder/repo/ioskpay/xcode-cryptopp/cryptopp/build/Release-iphoneos/libcryptopp.a'  

This particular file should be derived from another project inside the main app - xcodebuild simply isn't correctly pointing at the right file folder which should be:

~/Library/Developer/Xcode/DerivedData

Any ideas?

like image 408
Todd McGuinness Avatar asked Feb 18 '13 23:02

Todd McGuinness


1 Answers

To fix this, go to your project settings, go to Targets and select your main project target. Then go to Build phases. Under Target dependencies add the static library project.

This way, when you compile the main project, the static library subproject gets compiled before the main project and your static library will be available.

like image 65
Byte Welder Avatar answered Sep 27 '22 01:09

Byte Welder