<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"\03A0\03C1\03BF-\03B4\03B9\03B1\03BC\03BF\03C1\03C6\03C9\03BC\03AD\03BD\03BF HTML Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.-HTMLChar
        {mso-style-name:"\03A0\03C1\03BF-\03B4\03B9\03B1\03BC\03BF\03C1\03C6\03C9\03BC\03AD\03BD\03BF HTML Char";
        mso-style-priority:99;
        mso-style-link:"\03A0\03C1\03BF-\03B4\03B9\03B1\03BC\03BF\03C1\03C6\03C9\03BC\03AD\03BD\03BF HTML";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EL link=blue vlink=purple><div class=WordSection1><pre><span lang=EN-US>Hello,<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>I posted the same message a few months ago but I had no answer.<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>I am sorry to do it but I will repost my question here hoping to find somebody who solved the problem I have.<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>I use Windows XP (SP3) and I compile GAlib 2.4.7 (and the examples <o:p></o:p></span></pre><pre><span lang=EN-US>included) with MS Visual C++ 2008 (express ed.) successfully.<o:p></o:p></span></pre><pre><span lang=EN-US>Yesterday, I decided to upgrade and try MS Visual C++ 2010 (express <o:p></o:p></span></pre><pre><span lang=EN-US>ed.) with both Windows XP and Windows Vista, but some errors came up...<o:p></o:p></span></pre><pre><span lang=EN-US>I had no problems building the static library. The problems came up <o:p></o:p></span></pre><pre><span lang=EN-US>with example 1.<o:p></o:p></span></pre><pre><span lang=EN-US>I will paste the build output here:<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>------ Build started: Project: ga, Configuration: Release Win32 ------<o:p></o:p></span></pre><pre><span lang=EN-US> GA1DArrayGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GA1DBinStrGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GA2DArrayGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GA2DBinStrGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GA3DArrayGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GA3DBinStrGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAAllele.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GABaseGA.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GABin2DecGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> gabincvt.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GABinStr.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GADCrowdingGA.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GADemeGA.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> gaerror.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAIncGA.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAList.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAListBASE.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAListGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAParameter.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> Compiling...<o:p></o:p></span></pre><pre><span lang=EN-US> GAPopulation.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> garandom.cpp<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\garandom.cpp(69): warning C4244: '=' : conversion from <o:p></o:p></span></pre><pre><span lang=EN-US>'time_t' to 'unsigned long', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\garandom.cpp(315): warning C4244: '=' : conversion from <o:p></o:p></span></pre><pre><span lang=EN-US>'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US> GARealGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(170): warning C4244: '+=' : conversion <o:p></o:p></span></pre><pre><span lang=EN-US>from 'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(187): warning C4244: '+=' : conversion <o:p></o:p></span></pre><pre><span lang=EN-US>from 'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(219): warning C4244: 'argument' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'const float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(220): warning C4244: 'argument' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'const float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(231): warning C4244: 'argument' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'const float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(264): warning C4244: 'initializing' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(265): warning C4244: 'initializing' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(283): warning C4244: 'initializing' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US>..\..\..\ga\GARealGenome.cpp(284): warning C4244: 'initializing' : <o:p></o:p></span></pre><pre><span lang=EN-US>conversion from 'double' to 'float', possible loss of data<o:p></o:p></span></pre><pre><span lang=EN-US> GAScaling.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GASelector.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GASimpleGA.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GASStateGA.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAStatistics.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GAStringGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GATree.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GATreeBASE.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> GATreeGenome.cpp<o:p></o:p></span></pre><pre><span lang=EN-US> ga.vcxproj -> C:\galib247\projects\vcpp2010\Release\ga.lib<o:p></o:p></span></pre><pre><span lang=EN-US>------ Build started: Project: ex1, Configuration: Debug Win32 ------<o:p></o:p></span></pre><pre><span lang=EN-US> ex1.cpp<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: virtual <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GA2DBinaryStringGenome::~GA2DBinaryStringGenome(void)" <o:p></o:p></span></pre><pre><span lang=EN-US>(??1GA2DBinaryStringGenome@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>UAE at XZ</span></a><span lang=EN-US>) referenced in function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: virtual <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GASimpleGA::~GASimpleGA(void)" (??1GASimpleGA@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>UAE at XZ</span></a><span lang=EN-US>) <o:p></o:p></span></pre><pre><span lang=EN-US>referenced in function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: class <o:p></o:p></span></pre><pre><span lang=EN-US>GAGenome const & __thiscall GAStatistics::bestIndividual(unsigned <o:p></o:p></span></pre><pre><span lang=EN-US>int)const " (?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>bestIndividual at GAStatistics</span></a><span lang=EN-US>@@QBEABVGAGenome@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>I at Z</span></a><span lang=EN-US>) <o:p></o:p></span></pre><pre><span lang=EN-US>referenced in function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: virtual <o:p></o:p></span></pre><pre><span lang=EN-US>int __thiscall GASimpleGA::populationSize(unsigned int)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>populationSize at GASimpleGA</span></a><span lang=EN-US>@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>UAEHI at Z</span></a><span lang=EN-US>) referenced in function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GASimpleGA::GASimpleGA(class GAGenome const &)" <o:p></o:p></span></pre><pre><span lang=EN-US>(??0GASimpleGA@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>QAE at ABVGAGenome</span></a><span lang=EN-US>@@@Z) referenced in function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GA2DBinaryStringGenome::GA2DBinaryStringGenome(unsigned <o:p></o:p></span></pre><pre><span lang=EN-US>int,unsigned int,float (__cdecl*)(class GAGenome &),void *)" <o:p></o:p></span></pre><pre><span lang=EN-US>(??0GA2DBinaryStringGenome@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>QAE at IIP6AMAAVGAGenome</span></a><span lang=EN-US>@@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>ZPAX at Z</span></a><span lang=EN-US>) referenced <o:p></o:p></span></pre><pre><span lang=EN-US>in function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "void __cdecl <o:p></o:p></span></pre><pre><span lang=EN-US>GARandomSeed(unsigned int)" (?GARandomSeed@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>YAXI at Z</span></a><span lang=EN-US>) referenced in <o:p></o:p></span></pre><pre><span lang=EN-US>function _main<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: void <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GAStatistics::flushScores(void)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>flushScores at GAStatistics</span></a><span lang=EN-US>@@QAEXXZ) referenced in function "public: <o:p></o:p></span></pre><pre><span lang=EN-US>virtual void __thiscall GAGeneticAlgorithm::evolve(unsigned int)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>evolve at GAGeneticAlgorithm</span></a><span lang=EN-US>@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>UAEXI at Z</span></a><span lang=EN-US>)<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: int <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GAParameterList::set(char const *,void const *)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>set at GAParameterList</span></a><span lang=EN-US>@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>QAEHPBDPBX at Z</span></a><span lang=EN-US>) referenced in function "public: <o:p></o:p></span></pre><pre><span lang=EN-US>int __thiscall GAParameterList::set(char const *,unsigned int)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>set at GAParameterList</span></a><span lang=EN-US>@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>QAEHPBDI at Z</span></a><span lang=EN-US>)<o:p></o:p></span></pre><pre><span lang=EN-US>ex1.obj : error LNK2019: unresolved external symbol "public: int <o:p></o:p></span></pre><pre><span lang=EN-US>__thiscall GAParameterList::set(char const *,double)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>set at GAParameterList</span></a><span lang=EN-US>@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>QAEHPBDN at Z</span></a><span lang=EN-US>) referenced in function "public: <o:p></o:p></span></pre><pre><span lang=EN-US>float __thiscall GAGeneticAlgorithm::pCrossover(float)" <o:p></o:p></span></pre><pre><span lang=EN-US>(?</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>pCrossover at GAGeneticAlgorithm</span></a><span lang=EN-US>@@</span><a href="http://mailman.mit.edu/mailman/listinfo/galib"><span lang=EN-US>QAEMM at Z</span></a><span lang=EN-US>)<o:p></o:p></span></pre><pre><span lang=EN-US>C:\galib247\projects\vcpp2010\Debug\ex1.exe : fatal error LNK1120: 10 <o:p></o:p></span></pre><pre><span lang=EN-US>unresolved externals<o:p></o:p></span></pre><pre><span lang=EN-US>========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>I have to mention that the same configuration in Windows Vista gave <o:p></o:p></span></pre><pre><span lang=EN-US>error LNK2001 insted of error LNK2019.<o:p></o:p></span></pre><pre><span lang=EN-US>Also, for example 1 I set Project Properties > Linker > Input > Ignore <o:p></o:p></span></pre><pre><span lang=EN-US>specific library to MSVCRTD.lib;msvcprtd.lib.<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>Any ideas how to build the examples properly?<o:p></o:p></span></pre><pre><span lang=EN-US>I read some previous posts about LNK2001 and LNK2019, but they didn't <o:p></o:p></span></pre><pre><span lang=EN-US>helped a lot.<o:p></o:p></span></pre><pre><span lang=EN-US>Thank you in advance,<o:p></o:p></span></pre><pre><span lang=EN-US>Kyriakos.<o:p></o:p></span></pre><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>-- <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Vafiadis S. Kyriakos<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Mechanical Engineer, PhD candidate<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>University of Western Macedonia<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Department of Mechanical Engineering<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Tel: +302461056682/6703 (lab/university)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> +302461056654 (UoWM Dept. of Mech. Engineering Practical Training Office)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> +306975549089 (mobile)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> </span>+302461029521 (home)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>