Visual Studio 2005 beta problem: link duplicate definitions
Posted by: Roger Garrett
Date: June 22, 2005 11:08AM

When compiing the example that comes with the MySQL C++ API software using Visual Studio 2005 beta there are link errors that occur, indicating that the MySQL API software is duplicating functions that are already defined in some of the standard libraries that come with Visual Studio 2005 beta. In particular, the link errors are as follows: Note the "already defined" statements, and that the last link error is a fatal error, "cannot open file 'libcp.lib'" (I have no idea where that is referenced).

>------ Build started: Project: examples, Configuration: Debug Win32 ------
>Linking...
>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in mysql++.lib(sql_query.obj)

>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in mysql++.lib(sql_query.obj)

>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z) already defined in mysql++.lib(sql_query.obj)

>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already defined in mysql++.lib(sql_query.obj)

>LINK : fatal error LNK1104: cannot open file 'libcp.lib'
>Build log was saved at "file://c:\Documents and Settings\Roger Garrett\My Documents\Visual Studio Projects\MySQL++1.7.1\examples\Debug\BuildLog.htm"
>examples - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any suggestions would be appreciated. Although it seems like I'm the only one attempting to get this thing compiled under VS 2005 beta.

- Roger Garrett

Options: ReplyQuote


Subject
Views
Written By
Posted
Visual Studio 2005 beta problem: link duplicate definitions
1005
June 22, 2005 11:08AM


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.