[galib] Problems Building the Examples with MS Visual C++ 2010, Not Solved

Vafiadis Kyriakos kvafiadis at uowm.gr
Mon Jun 13 14:40:45 EDT 2011


Hello,
 
I posted the same message a few months ago but I had no answer.
 
I am sorry to do it but I will repost my question here hoping to find
somebody who solved the problem I have.
 
I use Windows XP (SP3) and I compile GAlib 2.4.7 (and the examples  
included) with MS Visual C++ 2008 (express ed.) successfully.
Yesterday, I decided to upgrade and try MS Visual C++ 2010 (express  
ed.) with both Windows XP and Windows Vista, but some errors came up...
I had no problems building the static library. The problems came up  
with example 1.
I will paste the build output here:
 
------ Build started: Project: ga, Configuration: Release Win32 ------
   GA1DArrayGenome.cpp
   GA1DBinStrGenome.cpp
   GA2DArrayGenome.cpp
   GA2DBinStrGenome.cpp
   GA3DArrayGenome.cpp
   GA3DBinStrGenome.cpp
   GAAllele.cpp
   GABaseGA.cpp
   GABin2DecGenome.cpp
   gabincvt.cpp
   GABinStr.cpp
   GADCrowdingGA.cpp
   GADemeGA.cpp
   gaerror.cpp
   GAGenome.cpp
   GAIncGA.cpp
   GAList.cpp
   GAListBASE.cpp
   GAListGenome.cpp
   GAParameter.cpp
   Compiling...
   GAPopulation.cpp
   garandom.cpp
..\..\..\ga\garandom.cpp(69): warning C4244: '=' : conversion from  
'time_t' to 'unsigned long', possible loss of data
..\..\..\ga\garandom.cpp(315): warning C4244: '=' : conversion from  
'double' to 'float', possible loss of data
   GARealGenome.cpp
..\..\..\ga\GARealGenome.cpp(170): warning C4244: '+=' : conversion  
from 'double' to 'float', possible loss of data
..\..\..\ga\GARealGenome.cpp(187): warning C4244: '+=' : conversion  
from 'double' to 'float', possible loss of data
..\..\..\ga\GARealGenome.cpp(219): warning C4244: 'argument' :  
conversion from 'double' to 'const float', possible loss of data
..\..\..\ga\GARealGenome.cpp(220): warning C4244: 'argument' :  
conversion from 'double' to 'const float', possible loss of data
..\..\..\ga\GARealGenome.cpp(231): warning C4244: 'argument' :  
conversion from 'double' to 'const float', possible loss of data
..\..\..\ga\GARealGenome.cpp(264): warning C4244: 'initializing' :  
conversion from 'double' to 'float', possible loss of data
..\..\..\ga\GARealGenome.cpp(265): warning C4244: 'initializing' :  
conversion from 'double' to 'float', possible loss of data
..\..\..\ga\GARealGenome.cpp(283): warning C4244: 'initializing' :  
conversion from 'double' to 'float', possible loss of data
..\..\..\ga\GARealGenome.cpp(284): warning C4244: 'initializing' :  
conversion from 'double' to 'float', possible loss of data
   GAScaling.cpp
   GASelector.cpp
   GASimpleGA.cpp
   GASStateGA.cpp
   GAStatistics.cpp
   GAStringGenome.cpp
   GATree.cpp
   GATreeBASE.cpp
   GATreeGenome.cpp
   ga.vcxproj -> C:\galib247\projects\vcpp2010\Release\ga.lib
------ Build started: Project: ex1, Configuration: Debug Win32 ------
   ex1.cpp
ex1.obj : error LNK2019: unresolved external symbol "public: virtual  
__thiscall GA2DBinaryStringGenome::~GA2DBinaryStringGenome(void)"  
(??1GA2DBinaryStringGenome@@ <http://mailman.mit.edu/mailman/listinfo/galib>
UAE at XZ) referenced in function _main
ex1.obj : error LNK2019: unresolved external symbol "public: virtual  
__thiscall GASimpleGA::~GASimpleGA(void)" (??1GASimpleGA@@
<http://mailman.mit.edu/mailman/listinfo/galib> UAE at XZ)  
referenced in function _main
ex1.obj : error LNK2019: unresolved external symbol "public: class  
GAGenome const & __thiscall GAStatistics::bestIndividual(unsigned  
int)const " (? <http://mailman.mit.edu/mailman/listinfo/galib>
bestIndividual at GAStatistics@@QBEABVGAGenome@@
<http://mailman.mit.edu/mailman/listinfo/galib> I at Z)  
referenced in function _main
ex1.obj : error LNK2019: unresolved external symbol "public: virtual  
int __thiscall GASimpleGA::populationSize(unsigned int)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> populationSize at
GASimpleGA@@ <http://mailman.mit.edu/mailman/listinfo/galib> UAEHI at Z)
referenced in function _main
ex1.obj : error LNK2019: unresolved external symbol "public:  
__thiscall GASimpleGA::GASimpleGA(class GAGenome const &)"  
(??0GASimpleGA@@ <http://mailman.mit.edu/mailman/listinfo/galib> QAE at
ABVGAGenome@@@Z) referenced in function _main
ex1.obj : error LNK2019: unresolved external symbol "public:  
__thiscall GA2DBinaryStringGenome::GA2DBinaryStringGenome(unsigned  
int,unsigned int,float (__cdecl*)(class GAGenome &),void *)"  
(??0GA2DBinaryStringGenome@@ <http://mailman.mit.edu/mailman/listinfo/galib>
QAE at IIP6AMAAVGAGenome@@@ <http://mailman.mit.edu/mailman/listinfo/galib>
ZPAX at Z) referenced  
in function _main
ex1.obj : error LNK2019: unresolved external symbol "void __cdecl  
GARandomSeed(unsigned int)" (?GARandomSeed@@
<http://mailman.mit.edu/mailman/listinfo/galib> YAXI at Z) referenced in  
function _main
ex1.obj : error LNK2019: unresolved external symbol "public: void  
__thiscall GAStatistics::flushScores(void)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> flushScores at
GAStatistics@@QAEXXZ) referenced in function "public:  
virtual void __thiscall GAGeneticAlgorithm::evolve(unsigned int)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> evolve at
GAGeneticAlgorithm@@ <http://mailman.mit.edu/mailman/listinfo/galib> UAEXI
at Z)
ex1.obj : error LNK2019: unresolved external symbol "public: int  
__thiscall GAParameterList::set(char const *,void const *)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> set at GAParameterList@@
<http://mailman.mit.edu/mailman/listinfo/galib> QAEHPBDPBX at Z) referenced
in function "public:  
int __thiscall GAParameterList::set(char const *,unsigned int)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> set at GAParameterList@@
<http://mailman.mit.edu/mailman/listinfo/galib> QAEHPBDI at Z)
ex1.obj : error LNK2019: unresolved external symbol "public: int  
__thiscall GAParameterList::set(char const *,double)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> set at GAParameterList@@
<http://mailman.mit.edu/mailman/listinfo/galib> QAEHPBDN at Z) referenced in
function "public:  
float __thiscall GAGeneticAlgorithm::pCrossover(float)"  
(? <http://mailman.mit.edu/mailman/listinfo/galib> pCrossover at
GAGeneticAlgorithm@@ <http://mailman.mit.edu/mailman/listinfo/galib> QAEMM
at Z)
C:\galib247\projects\vcpp2010\Debug\ex1.exe : fatal error LNK1120: 10  
unresolved externals
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
 
I have to mention that the same configuration in Windows Vista gave  
error LNK2001 insted of error LNK2019.
Also, for example 1 I set Project Properties > Linker > Input > Ignore  
specific library to MSVCRTD.lib;msvcprtd.lib.
 
Any ideas how to build the examples properly?
I read some previous posts about LNK2001 and LNK2019, but they didn't  
helped a lot.
Thank you in advance,
Kyriakos.

 

 

-- 

Vafiadis S. Kyriakos

Mechanical Engineer, PhD candidate

University of Western Macedonia

Department of Mechanical Engineering

Tel:         +302461056682/6703 (lab/university)

                +302461056654 (UoWM Dept. of Mech. Engineering Practical
Training Office)

                +306975549089 (mobile)

                +302461029521 (home)

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20110613/42acb601/attachment.htm


More information about the galib mailing list