1
votes

I'm trying to build poco library on osx 10.9 with clang++.
I'm running make CXXFLAGS+=-stdlib=libstdc++ CFLAGS+=-stdlib=libstdc++ LDFLAGS+=-stdlib=libstdc++.
It've successfully compiled all .o files:

** Compiling src/UUIDGenerator.cpp (release, shared) clang++ -Iinclude -I/Users/croco/Work/poco-1.6.0-all/CppUnit/include -I/Users/croco/Work/poco-1.6.0-all/CppUnit/WinTestRunner/include -I/Users/croco/Work/poco-1.6.0-all/Foundation/include -I/Users/croco/Work/poco-1.6.0-all/XML/include -I/Users/croco/Work/poco-1.6.0-all/JSON/include -I/Users/croco/Work/poco-1.6.0-all/Util/include -I/Users/croco/Work/poco-1.6.0-all/Net/include -I/Users/croco/Work/poco-1.6.0-all/Crypto/include -I/Users/croco/Work/poco-1.6.0-all/NetSSL_OpenSSL/include -I/Users/croco/Work/poco-1.6.0-all/Data/include -I/Users/croco/Work/poco-1.6.0-all/Data/SQLite/include -I/Users/croco/Work/poco-1.6.0-all/Data/ODBC/include -I/Users/croco/Work/poco-1.6.0-all/Data/MySQL/include -I/Users/croco/Work/poco-1.6.0-all/MongoDB/include -I/Users/croco/Work/poco-1.6.0-all/Zip/include -I/Users/croco/Work/poco-1.6.0-all/PageCompiler/include -I/Users/croco/Work/poco-1.6.0-all/PageCompiler/File2Page/include -stdlib=libstdc++ -DNDEBUG -O2 -fasm-blocks -fPIC -c src/UUIDGenerator.cpp -o /Users/croco/Work/poco-1.6.0-all/Foundation/obj/Darwin/x86_64/release_shared/UUIDGenerator.o

But when linking, -stdlib flag doesn't used and i receive some errors like this:

Undefined symbols for architecture x86_64:
"std::basic_string, std::allocator >::data() const", referenced from: Poco::UnicodeConverter::convert(std::basic_string, std::allocator > const&, std::string&) in UnicodeConverter.o "std::basic_string, std::allocator >::length() const", referenced from: Poco::UnicodeConverter::convert(std::basic_string, std::allocator > const&, std::string&) in UnicodeConverter.o

What i'm doing wrong?

1

1 Answers

1
votes

Well, my solution is to put -stdlib flag to build/config/Darwin-clang and configure build with required Darwin-clang config.