Reputation: 89
Getting these error while trying to integrate SKMaps
framework
Undefined symbols for architecture x86_64:
"CRouteTestManager::calculateRoute(NGRouteInput const&, std::__1::shared_ptr<CRoute>&)", referenced from:
PoiTrackerTest::createRoute() in SKMaps(PoiTrackerTest.o)
"_gpTestRoutesManager", referenced from:
PoiTrackerTest::createRoute() in SKMaps(PoiTrackerTest.o)
createNavigationObject(int) in SKMaps(NavigationTest.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me resolve this error.
Environment :
Xcode 6.3.1, Mac OSX 10.10.3
Deployment Target iOS7.0
Supports Swift.
i was following this guide : http://developer.skobbler.com/getting-started/ios
and also added CoreMotion.framework as there were also linking errors related to that framework.
Upvotes: 2
Views: 189
Reputation: 2059
Faced with the same problem. Deleting -all_load
flag did not help, so I continued to research and found a solution:
Despite the fact that Skobbler declares the need for linking the libc++
library, in reality you need to link libstdc++.6
library. Note that linking libstdc++
will not help.
P.S. Xcode 6.4, iOS SDK 8.4
Upvotes: 1
Reputation: 2561
Cause of Linker Error
This appears to be the result of the linker flag -all_load
, which may have been added to your project through a CocoaPod. In the rare case that you have a static library with nothing but categories defined then you need this flag. Otherwise, it can be safely removed from your build. See discussion here:
What does the -all_load linker flag do?
From a link in the comments section on that discussion you can see that this bug that previously required -all_load
has been fixed since XCode 4.
Objective-C categories in static library
Probable Explanation
This framework has a bunch of tests defined inside, but their dependencies are not included in the framework. When the linker is forced to resolve and link all dependencies, it errors out because it cannot find them. Basically, the library should be cleaned up so that it doesn't contain these unnecessary symbols. The work around is to remove -all_load
for the time being.
Upvotes: 1