I followed the following steps in order to build CppDB:
svn co http://ift.tt/2uVfigs cppdb-trunk
cd cppdb-trunk
cmake ~/Desktop/cppdb-trunk
make
make install
Afterwards, I'm trying to compile and run the file example1.cpp from the examples directory.
When I run gcc example1.cpp
I get the following errors:
/tmp/ccGWenrv.o: In function
main': example1.cpp:(.text+0x2a): undefined reference to
std::allocator::allocator()' example1.cpp:(.text+0x42): undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)' example1.cpp:(.text+0x58): undefined reference to
cppdb::session::session(std::__cxx11::basic_string, std::allocator > const&)' example1.cpp:(.text+0x64): undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' example1.cpp:(.text+0x73): undefined reference to
std::allocator::~allocator()' example1.cpp:(.text+0x91): undefined reference tocppdb::session::operator<<(char const*)' example1.cpp:(.text+0xa5): undefined reference to
cppdb::statement::operator<<(void ()(cppdb::statement&))' example1.cpp:(.text+0xb4): undefined reference tocppdb::statement::~statement()' example1.cpp:(.text+0xd2): undefined reference to
cppdb::session::operator<<(char const)' example1.cpp:(.text+0xe6): undefined reference tocppdb::statement::operator<<(void (*)(cppdb::statement&))' example1.cpp:(.text+0xf5): undefined reference to
cppdb::statement::~statement()' example1.cpp:(.text+0x170): undefined reference tocppdb::statement::statement()' example1.cpp:(.text+0x18e): undefined reference to
cppdb::session::operator<<(char const*)' example1.cpp:(.text+0x1db): undefined reference tocppdb::statement::operator<<(tm const&)' example1.cpp:(.text+0x1e8): undefined reference to
cppdb::statement::operator<<(char const*)' example1.cpp:(.text+0x1fd): undefined reference to `cppdb::statement::operator=(cppdb::statement const&)'
etc.
Any suggestions?
Aucun commentaire:
Enregistrer un commentaire