[odb-users] Problems linking libodb-mysql with vs2012

Isaac Lascasas isaaclascasas at gmail.com
Sat Nov 3 13:58:17 EDT 2012


Hello

I am trying to build libodb-mysql-vc11 but I have a lot of unresolved
externals from mysql. I have installed the windows mysql package from
www.mysql.com. Visual studio points to the provided mysql libs under
/Connector C 6.0.2/lib/debug.

It seems that these prebuilt libraries don't play well with vc11 or that
I'm missing something important. I was able to build libodb but I'm stucked
in libodb-mysql. I wonder if there is a reliable way to build the mysql
connector for vc11 because I have downloaded the sources and I can't find
proper visual studio solutions.

Output:

 Creating library ..\..\lib\odb-mysql-d.lib and object
..\..\lib\odb-mysql-d.exp
1>connection.obj : error LNK2019: unresolved external symbol
_mysql_num_rows at 4 referenced in function "public: virtual unsigned __int64
__thiscall odb::mysql::connection::execute(char const *,unsigned int)"
(?execute at connection@mysql at odb@@UAE_KPBDI at Z)
1>connection.obj : error LNK2019: unresolved external symbol
_mysql_field_count at 4 referenced in function "public: virtual unsigned
__int64 __thiscall odb::mysql::connection::execute(char const *,unsigned
int)" (?execute at connection@mysql at odb@@UAE_KPBDI at Z)
1>connection.obj : error LNK2019: unresolved external symbol
_mysql_affected_rows at 4 referenced in function "public: virtual unsigned
__int64 __thiscall odb::mysql::connection::execute(char const *,unsigned
int)" (?execute at connection@mysql at odb@@UAE_KPBDI at Z)
1>connection.obj : error LNK2019: unresolved external symbol
_mysql_errno at 4referenced in function "public: __thiscall
odb::mysql::connection::connection(class odb::mysql::database &)"
(??0connection at mysql@odb@@QAE at AAVdatabase@12@@Z)
1>error.obj : error LNK2001: unresolved external symbol _mysql_errno at 4

[...]

1>C:\Users\Isaac
Lascasas\Desktop\odb_2_1_0\libodb-mysql-2.1.0\odb\mysql\..\..\bin\odb-mysql-d-2.1-vc11.dll
: fatal error LNK1120: 37 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Regards,
Isaac Lascasas.


More information about the odb-users mailing list