MySQL Forums
Forum List  »  Connector/C++

Link problem when I use mysqlcppconn-static.lib for Visual studio 2005 (x64)
Posted by: Myeongho AN
Date: July 05, 2009 08:41PM

Help me!!.

I try to use mysqlcppconn-static.lib with visual C++ 2005.( mysqlcppconn-static.lib is downloaded from mysql.com site. )
I set the my project to using static MFC Library. and compile project. but I see the link error.

1>------ Build started: Project: MySQLConn, Configuration: Debug x64 ------
1>Linking...
1>MySQLConnDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl sql::SQLException::getErrorCode(void)const " (__imp_?getErrorCode@SQLException@sql@@QEBAHXZ) referenced in function "int `public: void __cdecl CMySQLConnDlg::OnBnClickedBtnTest(void)'::`1'::catch$0" (?catch$0@?0??OnBnClickedBtnTest@CMySQLConnDlg@@QEAAXXZ@4HA)
1>MySQLConnDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class sql::mysql::MySQL_Driver * __cdecl sql::mysql::MySQL_Driver::Instance(void)" (__imp_?Instance@MySQL_Driver@mysql@sql@@SAPEAV123@XZ) referenced in function "public: void __cdecl CMySQLConnDlg::OnBnClickedBtnTest(void)" (?OnBnClickedBtnTest@CMySQLConnDlg@@QEAAXXZ)
1>E:\Project\Temp\MySQLConn\x64\Debug\MySQLConn.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://e:\Project\Temp\MySQLConn\x64\Debug\BuildLog.htm"
1>MySQLConn - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What I have to do for clear the problem.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.