3

I'm creating a simple chat app with Quickblox.

So I added the project to XCode exactly like in this tutorial: http://quickblox.com/developers/IOS-how-to-connect-Quickblox-framework

QBUsers class worked just fine, but when I used QBChat I started to get linker errors:

Undefined symbols for architecture i386: "operator delete(void*)", referenced from: -[QBVideoChat initAudioCapture] in Quickblox(QBVideoChat.o) "operator new(unsigned long)", referenced from: -[QBVideoChat initAudioCapture] in Quickblox(QBVideoChat.o) "___gxx_personality_v0", referenced from: Dwarf Exception Unwind Info (__eh_frame) in Quickblox(QBVideoChat.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here's the line that causes the problem (if I comment it out, linker errors go away):

[[QBChat instance] setDelegate:self];

The class in which the problem occurs implements the following protocols:

<QBActionStatusDelegate, QBChatDelegate>

Here's the list of frameworks I imported to the project:

-lxml2 -lresolv -lz -framework AVFoundation -framework CoreVideo -framework Accelerate -framework CoreMedia -framework AudioToolbox -framework CoreData -framework CoreLocation -framework CoreGraphics -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework Quickblox -framework UIKit -framework Foundation

4
  • I included all the libraries that were in the tutorial...
    – Sergey
    May 31, 2013 at 21:02
  • If you really did, then try cleaning the project. Sometimes that helps with issues like this. May 31, 2013 at 21:14
  • 4
    You're either missing the C++ standard library, or you have linked to the wrong C++ standard library (there are two of them). Try adding either libc++ or libstdc++. May 31, 2013 at 22:14
  • Thanks Greg, it worked! Perhaps you can post this as an answer?
    – Sergey
    Jun 1, 2013 at 7:09

3 Answers 3

25

As it was suggested in comments by Greg Parker, I added libc++.dylib to the project and everything worked.

2
2

I had the same problem, I added the libc++ and resolved

1
  • This is pretty much a duplicate of the accepted answer. If you find an answer helpful, just vote it up (once you have permissions). There is no need to repeat efforts
    – KyleMit
    Dec 11, 2013 at 19:54
2

For iOS9 do following in your application's target: in build phases->Link Binary With Libraries ->search and add 'libstdc++.tbd'

In case you're trying to add this in a library target this won't work. the 'libstdc++.tbd' is not an object file so it can't be added into an objective-c library's target, it needs to be added in an application that wants to use the library.

0

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.