VC++ 6.0 LINKING PROBLEM

yuna hyuna at CLEMSON.EDU
Tue Aug 20 11:39:28 EDT 2002


Hi Edmanuel,

  I do it as what you told me, but I got the following linking errors like:
Linking...
ex1.obj : error LNK2001: unresolved external symbol _atoi
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _atoi
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol _strcmp
ex1.obj : error LNK2001: unresolved external symbol _strcmp
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol _strcmp
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _strcmp
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol _strcmp
ex1.obj : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::flush(void)" (?flush at ostream@@QAEAAV1 at XZ)
ga.lib(gaerror.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0 at PBD@Z)
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0 at PBD@Z)
ex1.obj : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0 at PBD@Z)
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0 at PBD@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0 at PBD@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0 at PBD@Z)
ex1.obj : error LNK2001: unresolved external symbol "class ostream_withassign  cout" (?cout@@3Vostream_withassign@@A)
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ex1.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GASelector.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(garandom.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol __fltused
ex1.obj : error LNK2001: unresolved external symbol __fltused
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol __fltused
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GASelector.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(gaerror.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(garandom.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GABinStr.obj) : error LNK2001: unresolved external symbol __chkesp
ex1.obj : error LNK2001: unresolved external symbol __chkesp
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol __chkesp
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol __except_list
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol __except_list
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol __except_list
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol __except_list
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol __except_list
ex1.obj : error LNK2001: unresolved external symbol __except_list
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol __except_list
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol __except_list
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol __except_list
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "const  type_info::`vftable'" (??_7type_info@@6B@)
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GASelector.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GABinStr.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3 at YAXPAX@Z)
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GASelector.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GABinStr.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GAGenome.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z)
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol ___RTDynamicCast
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol ___RTDynamicCast
ga.lib(GASimpleGA.obj) : error LNK2001: unresolved external symbol ___RTDynamicCast
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol ___RTDynamicCast
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol ___RTDynamicCast
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol _isdigit
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _isdigit
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol "public: class istream & __thiscall istream::operator>>(char &)" (??5istream@@QAEAAV0 at AAD@Z)
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(short)" (??6ostream@@QAEAAV0 at F@Z)
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol __ftol
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol __ftol
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol __ftol
ga.lib(GASelector.obj) : error LNK2001: unresolved external symbol __ftol
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol _memcmp
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GABinStr.obj) : error LNK2001: unresolved external symbol _memcpy
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol _memmove
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _memmove
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol _memmove
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol _memset
ga.lib(GA2DBinStrGenome.obj) : error LNK2001: unresolved external symbol _memset
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol _memset
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _memset
ga.lib(GABinStr.obj) : error LNK2001: unresolved external symbol _memset
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol _strcpy
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _strcpy
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol _strcpy
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol _strlen
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _strlen
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol _strlen
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: void __thiscall ofstream::close(void)" (?close at ofstream@@QAEXXZ)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: void __thiscall ofstream::close(void)" (?close at ofstream@@QAEXXZ)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: __thiscall ofstream::ofstream(char const *,int,int)" (??0ofstream@@QAE at PBDHH@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: __thiscall ofstream::ofstream(char const *,int,int)" (??0ofstream@@QAE at PBDHH@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: static int const  filebuf::openprot" (?openprot at filebuf@@2HB)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: static int const  filebuf::openprot" (?openprot at filebuf@@2HB)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall ios::~ios(void)" (??1ios@@UAE at XZ)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall ios::~ios(void)" (??1ios@@UAE at XZ)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall ofstream::~ofstream(void)" (??1ofstream@@UAE at XZ)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall ofstream::~ofstream(void)" (??1ofstream@@UAE at XZ)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(unsigned long)" (??6ostream@@QAEAAV0 at K@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(unsigned int)" (??6ostream@@QAEAAV0 at I@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(double)" (??6ostream@@QAEAAV0 at N@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(double)" (??6ostream@@QAEAAV0 at N@Z)
ga.lib(GAStatistics.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(int)" (??6ostream@@QAEAAV0 at H@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(int)" (??6ostream@@QAEAAV0 at H@Z)
ga.lib(garandom.obj) : error LNK2001: unresolved external symbol _time
ga.lib(garandom.obj) : error LNK2001: unresolved external symbol _sqrt
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol _sqrt
ga.lib(garandom.obj) : error LNK2001: unresolved external symbol _log
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _strcat
ga.lib(gaerror.obj) : error LNK2001: unresolved external symbol _strcat
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol _atof
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: class istream & __thiscall istream::operator>>(char *)" (??5istream@@QAEAAV0 at PAD@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "protected: class istream & __thiscall istream::get(char *,int,int)" (?get at istream@@IAEAAV1 at PADHH@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: class ostream & __thiscall ostream::operator<<(unsigned char)" (??6ostream@@QAEAAV0 at E@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: void __thiscall ifstream::close(void)" (?close at ifstream@@QAEXXZ)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: __thiscall ifstream::ifstream(char const *,int,int)" (??0ifstream@@QAE at PBDHH@Z)
ga.lib(GAParameter.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall ifstream::~ifstream(void)" (??1ifstream@@UAE at XZ)
ga.lib(gaerror.obj) : error LNK2001: unresolved external symbol "class ostream_withassign  cerr" (?cerr@@3Vostream_withassign@@A)
ga.lib(gaerror.obj) : error LNK2001: unresolved external symbol _sprintf
ga.lib(GABaseGA.obj) : error LNK2001: unresolved external symbol __purecall
ga.lib(GAPopulation.obj) : error LNK2001: unresolved external symbol __purecall
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector constructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *),void (__thiscall*)(void *))" (??_L at YGXPAXIHP6EX0@Z1 at Z)
ga.lib(GADemeGA.obj) : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M at YGXPAXIHP6EX0@Z at Z)
ga.lib(GAScaling.obj) : error LNK2001: unresolved external symbol _pow
Debug/ex.exe : fatal error LNK1120: 50 unresolved externals
Error executing link.exe.

ex.exe - 163 error(s), 0 warning(s)

  So what is it wrong?
Yuna



<Original message>
I think that you need first recompile the ga.lib, with the followings
changes into gaconfig.h
// By default, we use the old streams library.  
#if !defined(USE_OLD_STREAMS) && \
!defined(USE_ANSI_STREAMS) && \
!defined(NO_STREAMS)
#define USE_OLD_STREAMS
//USE_ANSI_STREAMS
#endif

also you need do something changes in your Project Setting 

(Project Setting | Link | Ignore Libraries)

With: libcmt
Also set:
(Project Setting | C/C++ | Use run-time library) 
With: Multithreaded

Then you will be enable for compile your example in msv6, I was do it and I

When you compile a program, you need the Project Setting too.

>Regards,
>_________________________________________
>Edmanuel E. Torres Amaris
edmanuel.torres at ecopetrol.com.co <mailto:edmanuel.torres at ecopetrol.com.co> 
eetorres at lycos.com <mailto:eetorres at lycos.com> 
>Tel 6356765 - of. 6740406
OSTG> - Optics and Signals Treatment Group
>Universidad Industrial de Santander
>UIS - www.uis.edu.co <http://www.uis.edu.co> 
>Oilfield - ICP - ECOPETROL
www.ecopetrol.com.com <http://www.ecopetrol.com.com> 
>Bucaramanga
Colombia

******************************************
Yuna Hu
125 EIB Fluor Daniel
Clemson, SC  29634 
 (864) 656-7176 (O)
 (864) 654-4179 (H)
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20020820/a8e68ab3/attachment.htm


More information about the galib mailing list