Search code examples
c++mysqlvisual-studiosoci

SOCI external symbol unresolved "struct soci::mysql_backend_factory const soci::mysql"


I'm really confused, i'm stuck with this problem, i hope you can help me :

I use : Windows 8.1, Visual Studio Express 2013 and SOCI 3.2.2

I have compiled both libsoci_mysql and libsoci_core and linked them into my project, but when i launch the compilation this error appear :

Error 1 error LNK2001: external symbol unresolved "struct soci::mysql_backend_factory const soci::mysql" (?mysql@soci@@3Umysql_backend_factory@1@B) dbConnection.obj Server

I'm a little bit lost with Window, but i'm praticly sure libsoci_mysql.lib is found and (i have open the .lib with GNU emacs) contains the symbols.


Solution

  • Looks like it's a known problem with MSVC. The proposed workaround is to replace soci::mysql usage with *soci::factory_mysql().