MySQL Forums
Forum List  »  Connector/C++

Link error with mysqlcppconn-static.lib on Visual C++ 2005
Posted by: Myeongho AN
Date: December 26, 2008 11:00PM

I made Connector/C++ library with follow steps.

1. >set path=%path%;E:\Temp\MySQL_Conn_cpp\cmake-2.6.2-win32-x86\bin
2. >set MYSQL_DIR=E:\Temp\MySQL_Conn_cpp\mysql-5.1.30-win32
3. debug >cmake -G "Visual Studio 8 2005" -DCMAKE_BUILD_TYPE=Debug
release >cmake -G "Visual Studio 8 2005"
5. debug > MYSQLCPPCONN.sln /build Release
release > MYSQLCPPCONN.sln /build Debug

and then, I try to use mysqlcppconn-static.lib, but I met follow error.

MySQLConnDlg.obj : error LNK2001: "__declspec(dllimport) public: static class sql::mysql::MySQL_Driver * __cdecl sql::mysql::MySQL_Driver::Instance(void)" (__imp_?Instance@MySQL_Driver@mysql@sql@@SAPAV123@XZ)

How to solve this problem?

Options: ReplyQuote

Written By
Link error with mysqlcppconn-static.lib on Visual C++ 2005
December 26, 2008 11:00PM

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.