Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking error with Poco Net

I am stuck trying to get some code to build using the POCO libraries.

I get the following when I try to build

Undefined symbols for architecture x86_64:
  "Poco::Net::SocketAddress::SocketAddress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned short)", referenced from:
      .....
ld: symbol(s) not found for architecture x86_64

Now here is the catch: I am linking with -lPocoFoundation -lPocoNet -lPocoUtil

What am I missing?

(I should say that I am compiling with clang on Mac OS X 10.8.2

like image 912
em70 Avatar asked May 26 '26 08:05

em70


1 Answers

I have the same problem. I found change xcode build setting is useful. Change C++ Standard Library from libc++(LLVM C++ standard library with C++ 11 support) to libstdc++(GNU C++ standard library). Then it will pass building.

like image 156
leezii Avatar answered May 31 '26 04:05

leezii



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!