I am trying to set up Xcode5 to create a C++ application which uses the libspotify.framework SDK. I have tried several combinations of adding the framework to the build phases, changing search paths, etc. The program will build but it fails at runtime throwing an error (below).
So far, in my programming experience, I have been able to link static libraries into Xcode C++ programs, but this is the first time I am trying to link a *.framework library into a C++ program.
Can anyone point out the step-by-step instructions on how to include a *.framework in a simple C++ console application? I'm pretty sure this is a "C" library so it should be possible, right?
Simple program:
#include <iostream>
#include "api.h"
int main(int argc, const char * argv[])
{
// do some simple thing with the api
return 0;
}
Runtime Error:
dyld: Library not loaded: @loader_path/../Frameworks/libspotify.framework/libspotify
Referenced from: /Users/mjb/Desktop/SpotifyTest/DerivedData/SpotifyTest/Build/Products/Debug/SpotifyTest Reason: image not found Program ended with exit code: 9(lldb)
Screenshot of the Xcode Project: