Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Errors Building an MFC App with MySql++

Status
Not open for further replies.

Syscwl

IS-IT--Management
Mar 23, 2001
9
US
We're building an MySql++ MFC simple Dialog Based app using MFC in a shared DLL.
The only lib used as input to the link is mysql++.lib which we built from a MySql download using its default .dsw settings. We don't get these if we build a console app. They appear to relate to the Standard Cpp template lib...can anyone help...thanks..

Here is the link Error output...
--------------------Configuration: TestMySql - Win32 Debug--------------------
Linking...
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;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)&quot; (??1?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in mysql++.lib(connection.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::eek:perator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)&quot; (??6std@@YAAAV?$basic_ostream@DU?$cha
r_traits@D@std@@@0@AAV10@PBD@Z) already defined in mysql++.lib(manip.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;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> >(class basic_string<char,s
truct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)&quot; (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z) already defined in mysql++.lib(connection.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;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> >(class basic_string<char,s
truct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)&quot; (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in mysql
++.lib(connection.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)&quot; (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined
in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: __thiscall std::_Lockit::~_Lockit(void)&quot; (??1_Lockit@std@@QAE@XZ) already defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: virtual __thiscall std::basic_iostream<char,struct std::char_traits<char> >::~basic_iostream<char,struct std::char_traits<char> >(void)&quot; (??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ) a
lready defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: __thiscall std::basic_iostream<char,struct std::char_traits<char> >::basic_iostream<char,struct std::char_traits<char> >(class basic_iostream<char,struct std::char_traits<char> >::basic_streambuf<
char,struct std::char_traits<char> > *)&quot; (??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z) already defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)&quot; (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ
) already defined in mysql++.lib(sql_query.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const &quot; (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q
BEPBDXZ) already defined in mysql++.lib(connection.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: &quot;public: char & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::eek:perator[](unsigned int)&quot; (??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEA
ADI@Z) already defined in mysql++.lib(field_names.obj)
libcp.lib(iostream.obj) : error LNK2005: &quot;public: __thiscall std::ios_base::Init::Init(void)&quot; (??0Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(iostream.obj) : error LNK2005: &quot;public: __thiscall std::ios_base::Init::~Init(void)&quot; (??1Init@ios_base@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale.obj) : error LNK2005: &quot;public: __thiscall std::_Locinfo::_Locinfo(char const *)&quot; (??0_Locinfo@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale.obj) : error LNK2005: &quot;public: __thiscall std::_Locinfo::~_Locinfo(void)&quot; (??1_Locinfo@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: &quot;public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const &quot; (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: &quot;public: bool __thiscall std::locale::_Iscloc(void)const &quot; (?_Iscloc@locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: &quot;private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)&quot; (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(ios.obj) : error LNK2005: &quot;public: void __thiscall std::ios_base::clear(int,bool)&quot; (?clear@ios_base@std@@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(ios.obj) : error LNK2005: &quot;public: virtual __thiscall std::ios_base::~ios_base(void)&quot; (??1ios_base@std@@UAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(ios.obj) : error LNK2005: &quot;protected: void __thiscall std::ios_base::_Init(void)&quot; (?_Init@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
LIBC.lib(strtol.obj) : error LNK2005: _strtol already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in LIBC.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib &quot;msvcrtd.lib&quot; conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib &quot;LIBC&quot; conflicts with use of other libs; use /NODEFAULTLIB:library
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/TestMySql.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

TestMySql.exe - 31 error(s), 2 warning(s)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top