[odb-users] C++11 with clang on OSX 10.8

Philipp Maluta fil.the.ensoreus at gmail.com
Tue Aug 27 07:53:31 EDT 2013


Hello.
 Sorry,  just messed up with subj. 
Suppose the problem with libodb-sqlite. But the library in it's place and cutting off from linker command line the -lodb-sqlite produces much more errors. 

Generated code with 
odb -d sqlite -q -s NoteCore.hpp

libodb-sqlite built with 
configure CC=clang  CPPFLAGS="--std=c++11 --libstd=libc++" --prefix=/opt/local/lib && make

and making my project throws with linker error:

Undefined symbols for architecture x86_64:
"odb::sqlite::delete_statement::delete_statement(odb::sqlite::connection&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, odb::sqlite::binding&)", referenced from:
odb::access::object_traits_impl<NoteEntity, (odb::database_id)1>::erase_query(odb::database&, odb::sqlite::query_base const&) in NoteEntity-odb.cxx.o
"odb::sqlite::select_statement::select_statement(odb::sqlite::connection&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, odb::sqlite::binding&, odb::sqlite::binding&)", referenced from:
odb::access::object_traits_impl<NoteEntity, (odb::database_id)1>::query(odb::database&, odb::sqlite::query_base const&) in NoteEntity-odb.cxx.o
"odb::sqlite::default_value_traits<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, (odb::sqlite::database_type_id)2>::set_image(odb::details::basic_buffer<char>&, unsigned long&, bool&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
odb::access::object_traits_impl<NoteEntity, (odb::database_id)1>::init(odb::access::object_traits_impl<NoteEntity, (odb::database_id)1>::image_type&, NoteEntity const&, odb::sqlite::statement_kind) in NoteEntity-odb.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [NotesCore_test] Error 1
make[1]: *** [CMakeFiles/NotesCore_test.dir/all] Error 2

Can you point me to the reason why the statements can't be linked while they are presents in the libodb-sqlite.
Please, help me.



More information about the odb-users mailing list