user952647
user952647

Reputation:

getting linking error due to different library for ios and iphonesimulator?

I am using libiVisualizationChart.a library, there are separate libraries for iphoneos and iphonesimulator. I have added both the libraries in xcode project and mentioned both the library paths in Library Search Path, but I am able to build for simulator only not for device. Can any one help me why I am getting the linking error?

Error:

  "_OBJC_CLASS_$_VSColor", referenced from:


      objc-class-ref-to-VSColor in ChartView.o


  "_OBJC_CLASS_$_VSTransform3D", referenced from:


      objc-class-ref-to-VSTransform3D in ChartView.o

Upvotes: 2

Views: 535

Answers (2)

User97693321
User97693321

Reputation: 3346

You can try by changing the order of libraries in the Library Search Path in build settings. For device build iphoneos library should be above to iphonesimulator library and vice-versa.

let it should work.

Upvotes: 0

utahwithak
utahwithak

Reputation: 6325

Make sure that they are weak linked. In your project settings, under Build Phases, there is "Link Binary With Libraries" find the two libraries and set them to optional. This should clear up that linking error.

Upvotes: 1

Related Questions