![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
Visual C++ Question
I have two working projects each with a .lib library file attached to them. The two projects are GWin (something my uni created as an alternative to MFC) and MySQL++ (used to connect to a MySQL database with c++)
My problem is that I need to draw on elements of both projects but when I try to merge the two projects there are conflicts in the two .lib files. Any ideas?? Ta Ade
__________________
Don't wound what you can't kill |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
I think you need to give us more information for us to work on. What are you merging? What files are involved? What libraries are you using?
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
It sounds like duplicate symbol names, from the limited information. If that's the case, and the libraries are off-the-shelf, you're kinda up the creek without a lot of trouble.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
yeah they are off the shelf style packages.
I was fearing that would be the case. Why is this damn project so hard?!!
__________________
Don't wound what you can't kill |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
To build your character
.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 852
Rep Power: 4
![]() |
I just download the mysql++ source and it seems to all be in a namespace. Maybe you should show us the error messages you are getting.
|
|
|
|
|
|
#7 |
|
Programmer
Join Date: Jun 2005
Posts: 99
Rep Power: 4
![]() |
Could be just the standard library is being linked in by both libraries, you could try disabling 'Link Library Dependencies' (project>properties>Linker>general), this *might* help I don't know.
|
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
These are the errors I'm getting when I try to build two files in the project.
One is from a file that uses the MySQL++ stuff and the other is related to the GWin stuff. Any help would be greatly appreciated. --------------------Configuration: examples - Win32 Release-------------------- Linking... simple1.obj : error LNK2005: _main already defined in map.obj LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification msvcprtd.lib(MSVCP60D.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_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in map.obj msvcprtd.lib(MSVCP60D.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> >(class std::basic_string<c har,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in simple1.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q BEPBDXZ) already defined in simple1.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ) already defined in libcp.lib(iostream.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@ios_base@std@@QAE@XZ) already defined in libcp.lib(iostream.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Winit::_Winit(void)" (??0_Winit@std@@QAE@XZ) already defined in libcp.lib(wiostrea.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Winit::~_Winit(void)" (??1_Winit@std@@QAE@XZ) already defined in libcp.lib(wiostrea.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: char & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator[](unsigned int)" (??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEA ADI@Z) already defined in simple1.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: void __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::`vbase destructor'(void)" (??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D @2@@std@@QAEXXZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(voi d)const " (?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??0? $basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??6std@@YAAAV?$basic_ostream@DU?$cha r_traits@D@std@@@0@AAV10@PBD@Z) already defined in simple1.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsign ed int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std @@QAEAAV01@H@Z) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "struct std::_Smanip<int> __cdecl std::setprecision(int)" (?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z) already defined in libcp.lib(iomanip.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "struct std::_Smanip<int> __cdecl std::setw(int)" (?setw@std@@YA?AU?$_Smanip@H@1@H@Z) already defined in libcp.lib(iomanip.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned int)" (??6?$basic_ostream@DU?$char_traits@D@ std@@@std@@QAEAAV01@I@Z) already defined in simple1.obj MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _free already defined in LIBC.lib(free.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _malloc already defined in LIBC.lib(malloc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _exit already defined in LIBC.lib(crt0dat.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncpy already defined in LIBC.lib(strncpy.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _setvbuf already defined in LIBC.lib(setvbuf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __open_osfhandle already defined in LIBC.lib(osfinfo.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncmp already defined in LIBC.lib(strncmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in LIBC.lib(sprintf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fclose already defined in LIBC.lib(fclose.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _wcslen already defined in LIBC.lib(wcslen.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _abort already defined in LIBC.lib(abort.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fwrite already defined in LIBC.lib(fwrite.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fflush already defined in LIBC.lib(fflush.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _tolower already defined in LIBC.lib(tolower.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _toupper already defined in LIBC.lib(toupper.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __itoa already defined in LIBC.lib(xtoa.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __close already defined in LIBC.lib(close.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in LIBC.lib(realloc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _getenv already defined in LIBC.lib(getenv.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _calloc already defined in LIBC.lib(calloc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtod already defined in LIBC.lib(strtod.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _atoi already defined in LIBC.lib(atox.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtoul already defined in LIBC.lib(strtol.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __isctype already defined in LIBC.lib(isctype.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strchr already defined in LIBC.lib(strchr.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _memmove already defined in LIBC.lib(memmove.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtol already defined in LIBC.lib(strtol.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fputc already defined in LIBC.lib(fputc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strftime already defined in LIBC.lib(strftime.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __strnicmp already defined in LIBC.lib(strnicmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __stricmp already defined in LIBC.lib(stricmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __strdup already defined in LIBC.lib(strdup.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __read already defined in LIBC.lib(read.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __lseek already defined in LIBC.lib(lseek.obj) LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library simple1.obj : error LNK2001: unresolved external symbol "public: __thiscall MysqlConnection::~MysqlConnection(void)" (??1MysqlConnection@@QAE@XZ) simple1.obj : error LNK2001: unresolved external symbol "public: __thiscall MysqlResUse::~MysqlResUse(void)" (??1MysqlResUse@@QAE@XZ) simple1.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class mysql_ColData<class const_string> const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$mysql_ColData@Vconst_string@@@@@Z) simple1.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4 simple1.obj : error LNK2001: unresolved external symbol "public: __thiscall MysqlConnection::MysqlConnection(char const *,char const *,char const *,char const *,bool)" (??0MysqlConnection@@QAE@PBD000_N@Z) simple1.obj : error LNK2001: unresolved external symbol _mysql_data_seek@12 simple1.obj : error LNK2001: unresolved external symbol _mysql_fetch_lengths@4 simple1.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4 simple1.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall MysqlResUse::num_fields(void)const " (?num_fields@MysqlResUse@@QBEIXZ) simple1.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall SQLQuery::str(class SQLQueryParms const &)const " (?str@SQLQuery@@QBE?AV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@@Z) simple1.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall SQLQuery::str(class SQLQueryParms const &,enum query_reset)" (?str@SQLQuery@@QAE?AV?$ basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@W4query_reset@@@Z) simple1.obj : error LNK2001: unresolved external symbol "public: class MysqlRes __thiscall MysqlConnection::store(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?store@MysqlConnection@@QAE?AVM ysqlRes@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) simple1.obj : error LNK2001: unresolved external symbol "private: void __thiscall MysqlFieldNames::init(class MysqlResUse const *)" (?init@MysqlFieldNames@@AAEXPBVMysqlResUse@@@Z) simple1.obj : error LNK2001: unresolved external symbol "private: void __thiscall FieldTypes::init(class MysqlResUse const *)" (?init@FieldTypes@@AAEXPBVMysqlResUse@@@Z) Release/examples.exe : fatal error LNK1120: 14 unresolved externals Error executing link.exe. examples.exe - 68 error(s), 2 warning(s) --------------------Configuration: examples - Win32 Release-------------------- Linking... LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification msvcprtd.lib(MSVCP60D.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_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ) already defined in libcp.lib(iostream.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@ios_base@std@@QAE@XZ) already defined in libcp.lib(iostream.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Winit::_Winit(void)" (??0_Winit@std@@QAE@XZ) already defined in libcp.lib(wiostrea.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Winit::~_Winit(void)" (??1_Winit@std@@QAE@XZ) already defined in libcp.lib(wiostrea.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: void __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::`vbase destructor'(void)" (??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D @2@@std@@QAEXXZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(voi d)const " (?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??0? $basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsign ed int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in map.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std @@QAEAAV01@H@Z) already defined in map.obj MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _free already defined in LIBC.lib(free.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _malloc already defined in LIBC.lib(malloc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _exit already defined in LIBC.lib(crt0dat.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncpy already defined in LIBC.lib(strncpy.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _setvbuf already defined in LIBC.lib(setvbuf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __open_osfhandle already defined in LIBC.lib(osfinfo.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncmp already defined in LIBC.lib(strncmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in LIBC.lib(sprintf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fclose already defined in LIBC.lib(fclose.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _wcslen already defined in LIBC.lib(wcslen.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _abort already defined in LIBC.lib(abort.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fwrite already defined in LIBC.lib(fwrite.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fflush already defined in LIBC.lib(fflush.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _tolower already defined in LIBC.lib(tolower.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _toupper already defined in LIBC.lib(toupper.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __itoa already defined in LIBC.lib(xtoa.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __close already defined in LIBC.lib(close.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in LIBC.lib(realloc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _getenv already defined in LIBC.lib(getenv.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _calloc already defined in LIBC.lib(calloc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtod already defined in LIBC.lib(strtod.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _atoi already defined in LIBC.lib(atox.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtoul already defined in LIBC.lib(strtol.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __isctype already defined in LIBC.lib(isctype.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strchr already defined in LIBC.lib(strchr.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _memmove already defined in LIBC.lib(memmove.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtol already defined in LIBC.lib(strtol.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fputc already defined in LIBC.lib(fputc.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strftime already defined in LIBC.lib(strftime.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __strnicmp already defined in LIBC.lib(strnicmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __stricmp already defined in LIBC.lib(stricmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __strdup already defined in LIBC.lib(strdup.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __read already defined in LIBC.lib(read.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __lseek already defined in LIBC.lib(lseek.obj) LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library Release/examples.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. examples.exe - 46 error(s), 2 warning(s)
__________________
Don't wound what you can't kill |
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I suspect that you have two mains, your doing, not the libraries. You can't write a main calling on one set of libraries and another main calling on another set and splice the two together. Write one application, using however many libraries you require. Use as many source files as you wish. Do NOT put main in more than one source file, do NOT pass GO, do NOT collect 200 buckeroos.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#10 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
I checked the 'exclude from build' box for all but one source file though. Could that still be the problem?
__________________
Don't wound what you can't kill |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|