Error when Linking in VC++

All questions regarding Windows programming, post here. API,COM, ActiveX, DirectX, OpenGL, MFC and so on...

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Error when Linking in VC++

Postby Pests » Tue Oct 07, 2003 3:57 pm

I got the MySQL++ API from the www.mysql.com website, one of the ones for VC++.

I did what the readme says to add it to a current project: Add 2 folders as an additional include dir, and then added mysql++.lib to the project, then #include <mysql++>.

Now, I did that and everything works, except when I add some code and try to Build the DLL, I dont know if I have to do something different when wokring with a DLL or not, but im getting alot of linking errors. Here is a few examples out of the 50 or so I get, they all basically follow the same message:



Code: Select all
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@
DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in command.obj

msvcprt.lib(MSVCP60.dll) : warning LNK4006: "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ) already defined in libcpmtd.lib(string.obj); second definition ignored
Pests
 

Postby Pests » Tue Oct 07, 2003 4:01 pm

This may help, dunno. http://pests.cywh.com/log.txt is the full list of errors

And incase I wasnt clear enough in the first post, I just need help getting this to work.
Pests
 

Postby MXP » Tue Oct 07, 2003 9:56 pm

You probably have to change some of your project's settings. The instructions for the library's setup should go over what changes must be made.
Need information on a function I've posted? Chances are it's at the MSDN.
MXP
 
Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm


Return to Windows Programming

Who is online

Users browsing this forum: Google Adsense [Bot] and 1 guest