undefined reference to `std::basic_string<wchar_t,
I am trying to compile my c++ files using cygwin. \Files are compiled but linking time errors occur These kind of errors...
undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::size() const'
and so开发者_JAVA百科me more errors like
undefined reference to `sqlite3_mprintf'
undefined reference to `sqlite3_exec'
undefined reference to `sqlite3_free'
undefined reference to `sqlite3_free'
undefined reference to `sqlite3_free'
undefined reference to `sqlite3_exec'
please help me out?
Thank you.
It looks like the standard C++ library is not getting linked in. Are you linking your code with g++
, gcc
or ld
? If using the first, that library gets linked in automatically, but not if you're using the other two.
For the errors about sqlite3
, you need to add -lsqlite3
to the link command (assuming you have it installed, of course).
精彩评论