10

Introduction

In a current project I'm working on we're using the ChartBoost SDK for popop commercials. We've been using this SDK for a while now with no problem whatsoever. It is a very simple library that essentially only has 1 header file called "ChartBoost.h" as well as a "libChartBoost.a" file.

Now we have just updated the SDK files with a new version. What I did here was simply removing the old SDK files from the project by "Move To Trash". What I did after was simply moving the new SDK files to the project, adding their references.

The problem

Right after doing this and compiling the project, I suddenly get 2 linking errors. Here's a screenshot of it:

Screenshot

I've tried pretty much everything I could think of to try and remove the error. I've cleaned the project and the project folder, and I've also tried to delete the derived data of the project through the organizer window.

I'm pretty certain this has something to do with the linker trying to use the references of the old files? But I'm not sure how I could go about getting it to remove those now-invalid references.

Is there anyone here who have any idea how this problem could be fixed?

[EDIT] Linking ChartBoost.a to the binary

So I tried linking the ChartBoost.a file to the binary through the "Build Phases" tab. This did get rid of the two original errors though revealed 8 new ones, shown in the screenshot below:

Linking errors 2

I'm not quite sure what these kind of linking errors are supposed to mean unfortunately :( Anyone got any ideas?

3
  • It look like you're missing some library or using ARC and library use retain etc. Commented Mar 25, 2012 at 20:01
  • 2
    BTW: A better way of upgrading would have been to just replace the ChartBoost.h and libChartBoost.a files, wherever they currently are on disk (that is, wherever Xcode's file references point to). You wouldn't have needed to change anything else.
    – Kurt Revis
    Commented Mar 25, 2012 at 21:09
  • Thanks for the tip Kurt Revis :) Commented Mar 25, 2012 at 21:22

1 Answer 1

14

In your app's target, look in "Build Phases", in the "Link Binary With Libraries" phase.

It should include libChartBoost.a.

If it doesn't, press the + button and select libChartBoost.a.

I'm pretty certain this has something to do with the linker trying to use the references of the old files?

No. You removed the old files from the project, and that included the reference in the "Link Binary With Libraries" build phase. When you added the new files to the project, you didn't add that reference back.

7
  • I've updated the original question with details and screenshots of the results. It did get rid of the two original problems but revealed 8 new ones Commented Mar 25, 2012 at 21:26
  • 2
    Look at the problematic class names and do a little research. SCNetworkReachabilityXXX is in the iOS SystemConfiguration framework, so add that to your linked libraries. SBJson3Parser is a JSON parser library that your libChartBoost is using. You see all those files in the JSON3 folder in the latest version of the ChartBoost SDK? Add them to your project!
    – Kurt Revis
    Commented Mar 25, 2012 at 21:40
  • Well, adding the SystemConfiguration Network did the trick for 6 of the errors. Now the only problem that remains is the fact that I get the original error again, only this time with "SBJson3Parser", which is apparently referenced in the libChartBoost.a library. The only problem is that The JSON3 Folder which comes with the ChartBoost library does not have any library file itself to include. I have included this folder as a part of the project by the way. It's just very odd as when we implemented ChartBoost the first time, we did not have to mess about with these library includes. Commented Mar 25, 2012 at 23:04
  • Actually you can see the error in the top of the screenshot, which is what remains: "_OBJC_CLASS_$_SBJson3Parser". I have included the folder and all of its files as part of the project. Commented Mar 25, 2012 at 23:06
  • 1
    You see all those .m files in JSON3? Make sure they are in the "Compile Sources" build phase of your target. As for why things changed: why don't you ask the ChartBoost people? Presumably they can explain!
    – Kurt Revis
    Commented Mar 25, 2012 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.