2

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.

Neeraj Raghavendra
  • 95
  • 1
  • 1
  • 11
  • I also have this issue. When I look inside the `SKMaps.framework` using `nm -a`, those symbols are undefined. I'm not sure where they would be defined, but for some reason the test project works. Looking deeper. – markshiz Sep 10 '15 at 15:44

2 Answers2

1

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.

Community
  • 1
  • 1
markshiz
  • 2,501
  • 22
  • 28
1

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

mkll
  • 2,058
  • 1
  • 15
  • 21