Potential Poco 1.4.4 issue with XCode

Please post support and help requests here.
Posts: 2
Joined: 08 Nov 2012, 18:02

Potential Poco 1.4.4 issue with XCode

Postby kinkadius » 08 Nov 2012, 21:09

Hello all,

I have run into an issue when trying to use Poco::Data::Session on the following setup:

Operating System: Mac OS X 10.8.2
IDE: XCode Version 4.5 (4G182)

Here is the code snippet from the project I included at the bottom of this post:

Code: Select all

#include <Poco/Data/Common.h>
#include <Poco/Data/SQLite/Connector.h>

int main(int argc, const char * argv[])
    using namespace Poco::Data;
    //Call register connector (works)
    //Create a statement with NULL session (works)
    Statement stmt(NULL);
    //Create a session with NULL values (fails)
    Session ses("SQLite", "sample.db");

    return 0;

Error Given from standard compiler:
Undefined symbols for architecture x86_64:
"Poco::Data::Session::Session(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here are the commands used for building on Mac OS X 10.8.2:
cd poco-1.4.4-all
./configure --omit=Data/ODBC,Data/MySQL
sudo make
sudo make install

Attachements for issue:
Example project: http://cl.ly/1I1f1Q383G16
Setting for standard compiler (broken): http://cl.ly/image/1n22231j471w
Changed setting for compiler (fixes): http://cl.ly/image/1r2Y2T1g440n

Posts: 1
Joined: 23 Nov 2012, 14:32

Re: Potential Poco 1.4.4 issue with XCode

Postby andrejacobs81 » 23 Nov 2012, 14:42

Thanks for this tip! I created a new project in XCode 4.5.2 and is static linking against Poco and was getting similiar linking issues for all the Poco libs.
So to just summarize to anyone reading this post in the future:
You need to change the C++ Standard Library to the GNU one
Build Settings
- Apple LLVM compiler 4.1 - Language
-- C++ Standard Library = libstdc++ (GNU C++ standard library)

Return to “Support”

Who is online

Users browsing this forum: No registered users and 7 guests