C++ STL linking error
C++ STL linking error
- Subject: C++ STL linking error
- From: Todd Heberlein <email@hidden>
- Date: Sun, 03 Mar 2013 15:41:07 -0800
I'm having a brain fart here. I hope someone can point out an obvious error.
I have my own C++ library. When I link against it in a Cocoa app (with the appropriate files set to .mm), everything works fine.
But when I start a new "Command Line Tool" project and try to link against the library, I get a lot of errors about missing STL symbols.
Undefined symbols for architecture x86_64:
"std::string::data() const", referenced from:
netsq::Buffer::operator<<(std::string const&) in libNetSQ.a(NetsqBuffer.o)
"std::string::length() const", referenced from:
netsq::Buffer::operator<<(std::string const&) in libNetSQ.a(NetsqBuffer.o)
"std::allocator<char>::std::allocator()", referenced from:
What is strange, I can use the undefined symbol just fine in my code
const char* p_data;
std::string foo = "bar";
p_data = foo.data();
// netsq::Buffer myBuf;
But when I uncomment the myBuf declaration, I get the linking error above (along with a bunch of other missing STL symbols).
Any idea where I am screwing up?
Thanks,
Todd
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden