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)
SQLite::Connector::registerConnector();
//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





