开发者

undefined reference to `std::basic_string<wchar_t,

开发者 https://www.devze.com 2023-04-11 19:04 出处:网络
I am trying to compile my c++ files using cygwin. \\Files are compiled but linking time errors occur These kind of errors...

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号