<FONT size=1> <div>Dear sir.</div> <div> </div> <div> This is my frist time for using your galib. I download the galib247 and create the library with command</div> <div>nmake /f makefile.vcpp</div> <div> and then i get the galib.lib with some warning as below</div> <div> </div> <div>[Warning....]</div> <div>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08<BR>Copyright (C) Microsoft Corporation. All rights reserved.</div> <div> cd ga<BR> nmake /nologo /f makefile.vcpp<BR> lib.exe /nologo /out:ga.lib garandom.o gaerror.o GAParameter.o GAStatist<BR>ics.o GABaseGA.o GASStateGA.o GASimpleGA.o GAIncGA.o GADemeGA.o GADCrowdingGA.o<BR>GASelector.o GAScaling.o GAPopulation.o GAGenome.o GABinStr.o gabincvt.o
GAAllel<BR>e.o GA1DBinStrGenome.o GA2DBinStrGenome.o GA3DBinStrGenome.o GABin2DecGenome.o G<BR>A1DArrayGenome.o GA2DArrayGenome.o GA3DArrayGenome.o GATreeBASE.o GATree.o GATre<BR>eGenome.o GAListBASE.o GAList.o GAListGenome.o<BR>GAList.o : warning LNK4221: no public symbols found; archive member will be inac<BR>cessible<BR>GATreeGenome.o : warning LNK4221: no public symbols found; archive member will b<BR>e inaccessible<BR>GATree.o : warning LNK4221: no public symbols found; archive member will be inac<BR>cessible<BR>GA3DArrayGenome.o : warning LNK4221: no public symbols found; archive member wil<BR>l be inaccessible<BR>GA2DArrayGenome.o : warning LNK4221: no public symbols found; archive member wil<BR>l be inaccessible<BR>GA1DArrayGenome.o : warning LNK4221: no public symbols found; archive member wil<BR>l be inaccessible<BR>GAAllele.o : warning LNK4221: no public symbols found; archive member will be in<BR>accessible<BR>ga is now
up-to-date<BR> cd ..<BR> cd examples<BR> nmake /nologo /f makefile.vcpp<BR> cd ..</div> <div>[End Warning]</div> <div> </div> <div>and after i use the galib.lib in my program. I develop my program with vc++.net base on window vista businees version and visual studio 2008. this is my some code :</div> <div> </div> <div>[code]</div> <div> <FONT color=#0000ff size=2></div> <div>#include</FONT><FONT size=2> </FONT><FONT color=#a31515 size=2><ga/GA1DArrayGenome.h></div></FONT><FONT color=#0000ff size=2> <div>#include</FONT><FONT size=2> </FONT><FONT color=#a31515 size=2><ga/std_stream.h></div></FONT><FONT color=#008000 size=2> <div>//#include "ga/GASStateGA.h"</div></FONT><FONT color=#0000ff size=2> <div>#pragma</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>once</div>
<div>float</FONT><FONT size=2> Objective(GAGenome &);</div></FONT><FONT color=#0000ff size=2> <div>ref</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> IntegerSolver</div> <div>{</div> <div></div></FONT><FONT color=#0000ff size=2> <div>public</FONT><FONT size=2>:</div> <div>IntegerSolver(</FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2>);</div> <div> </div></FONT><FONT color=#0000ff size=2> <div>float</FONT><FONT size=2> Objective(GAGenome & g)</div> <div>{</div> <div></FONT><FONT color=#008000 size=2>//GA1DArrayGenome<int> &genome = (GA1DArrayGenome<int> &)g;</div></FONT><FONT size=2> <div></FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> score=0.0;</div> <div></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> count=0;</div></FONT><FONT color=#008000 size=2> <div>// for(int i=0; i<genome.width(); i++){</div></FONT><FONT size=2> <div></div></FONT><FONT color=#008000
size=2> <div>// count++;</div> <div>// }</div></FONT><FONT size=2> <div></div> <div></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> score;</div> <div>}</div></FONT><FONT color=#0000ff size=2> <div>void</FONT><FONT size=2> GAStart(){</div> <div></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> width = 10;</div> <div></FONT><FONT color=#008000 size=2>//int height = 5;</div></FONT><FONT size=2> <div></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> popsize = 2000;</div> <div></FONT><FONT color=#008000 size=2>//int ngen = 400;</div></FONT><FONT size=2> <div></FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> pmut = 0.001;</div> <div></FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2> pcross = 0.9;</div> <div>GA1DArrayGenome<</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>> genome(width, ::Objective );</div> <div>}</div> <div>};</div></FONT> <div> </div> <div>[/code]</div> <div> </div>
<div>I set the project option > c\c++ >advanced > complie as > "Complie as C++ code (/TP)" and I get the error as below after i complie. </div> <div> </div> <div>[error]</div> <div>1>------ Build started: Project: DSS, Configuration: Debug Win32 ------</div> <div>1>Compiling...</div> <div>1>IntegerSolver.cpp</div> <div>1>DSS.cpp</div> <div>1>Generating Code...</div> <div>1>Linking...</div> <div>1>IntegerSolver.obj : error LNK2028: unresolved token (0A00000E) "int __clrcall GARandomBit(void)" (?GARandomBit@@$$FYMHXZ) referenced in function "public: static int __clrcall GA1DArrayGenome<int>::OnePointCrossover(class GAGenome const &,class GAGenome const &,class GAGenome *,class GAGenome *)" (?OnePointCrossover@?$GA1DArrayGenome@H@@$$FSMHABVGAGenome@@0PAV2@1@Z)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A00000F) "int __clrcall GARandomBit(void)" (?GARandomBit@@$$FYMHXZ) referenced in function
"public: static int __clrcall GA1DArrayGenome<int>::OnePointCrossover(class GAGenome const &,class GAGenome const &,class GAGenome *,class GAGenome *)" (?OnePointCrossover@?$GA1DArrayGenome@H@@$$FSMHABVGAGenome@@0PAV2@1@Z)</div> <div>1>IntegerSolver.obj : error LNK2020: unresolved token (0A00001A) "public: virtual __clrcall GAGenome::~GAGenome(void)" (??1GAGenome@@$$FUAM@XZ)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A00001A) "public: virtual __clrcall GAGenome::~GAGenome(void)" (??1GAGenome@@$$FUAM@XZ) referenced in function "public: virtual __clrcall GA1DArrayGenome<int>::~GA1DArrayGenome<int>(void)" (??1?$GA1DArrayGenome@H@@$$FUAM@XZ)</div> <div>1>IntegerSolver.obj : error LNK2028: unresolved token (0A00001B) "public: static void __clrcall GAGenome::NoInitializer(class GAGenome &)" (?NoInitializer@GAGenome@@$$FSMXAAV1@@Z) referenced in function "public: static void __clrcall std::_String_base::_Xlen(void)"
(?_Xlen@_String_base@std@@$$FSMXXZ)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A00001B) "public: static void __clrcall GAGenome::NoInitializer(class GAGenome &)" (?NoInitializer@GAGenome@@$$FSMXAAV1@@Z) referenced in function "public: __clrcall GA1DArrayGenome<int>::GA1DArrayGenome<int>(unsigned int,float (__clrcall*)(class GAGenome &),void *)" (??0?$GA1DArrayGenome@H@@$$FQAM@IP6MMAAVGAGenome@@@ZPAX@Z)</div> <div>1>IntegerSolver.obj : error LNK2028: unresolved token (0A00001C) "public: __clrcall GAGenome::GAGenome(void (__clrcall*)(class GAGenome &),int (__clrcall*)(class GAGenome &,float),float (__clrcall*)(class GAGenome const &,class GAGenome const &))" (??0GAGenome@@$$FQAM@P6MXAAV0@@ZP6MH0M@ZP6MMABV0@3@Z@Z) referenced in function "public: __clrcall GA1DArrayGenome<int>::GA1DArrayGenome<int>(unsigned int,float (__clrcall*)(class GAGenome &),void *)"
(??0?$GA1DArrayGenome@H@@$$FQAM@IP6MMAAVGAGenome@@@ZPAX@Z)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A00001C) "public: __clrcall GAGenome::GAGenome(void (__clrcall*)(class GAGenome &),int (__clrcall*)(class GAGenome &,float),float (__clrcall*)(class GAGenome const &,class GAGenome const &))" (??0GAGenome@@$$FQAM@P6MXAAV0@@ZP6MH0M@ZP6MMABV0@3@Z@Z) referenced in function "public: __clrcall GA1DArrayGenome<int>::GA1DArrayGenome<int>(unsigned int,float (__clrcall*)(class GAGenome &),void *)" (??0?$GA1DArrayGenome@H@@$$FQAM@IP6MMAAVGAGenome@@@ZPAX@Z)</div> <div>1>IntegerSolver.obj : error LNK2028: unresolved token (0A000021) "float __clrcall Objective(class GAGenome &)" (?Objective@@$$FYMMAAVGAGenome@@@Z) referenced in function "public: void __clrcall IntegerSolver::GAStart(void)" (?GAStart@IntegerSolver@@$$FQ$AAMXXZ)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A0000D6) "float __clrcall Objective(class
GAGenome &)" (?Objective@@$$FYMMAAVGAGenome@@@Z) referenced in function "public: void __clrcall IntegerSolver::GAStart(void)" (?GAStart@IntegerSolver@@$$FQ$AAMXXZ)</div> <div>1>IntegerSolver.obj : error LNK2028: unresolved token (0A000024) "float __clrcall garan2(void)" (?garan2@@$$FYMMXZ) referenced in function "int __clrcall GARandomInt(int,int)" (?GARandomInt@@$$FYMHHH@Z)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A0000D9) "float __clrcall garan2(void)" (?garan2@@$$FYMMXZ) referenced in function "int __clrcall GARandomInt(int,int)" (?GARandomInt@@$$FYMHHH@Z)</div> <div>1>IntegerSolver.obj : error LNK2028: unresolved token (0A000027) "void __clrcall GAErr(class GASourceLocator,char const *,char const *,enum GAErrorIndex,char const *,char const *)" (?GAErr@@$$FYMXVGASourceLocator@@PBD1W4GAErrorIndex@@11@Z) referenced in function "public: virtual int __clrcall GA1DArrayGenome<int>::read(class std::basic_istream<char,struct
std::char_traits<char> > &)" (?read@?$GA1DArrayGenome@H@@$$FUAMHAAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A0000DC) "void __clrcall GAErr(class GASourceLocator,char const *,char const *,enum GAErrorIndex,char const *,char const *)" (?GAErr@@$$FYMXVGASourceLocator@@PBD1W4GAErrorIndex@@11@Z) referenced in function "public: virtual int __clrcall GA1DArrayGenome<int>::read(class std::basic_istream<char,struct std::char_traits<char> > &)" (?read@?$GA1DArrayGenome@H@@$$FUAMHAAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)</div> <div>1>IntegerSolver.obj : error LNK2020: unresolved token (0A000028) "public: virtual void __clrcall GAGenome::copy(class GAGenome const &)" (?copy@GAGenome@@$$FUAMXABV1@@Z)</div> <div>1>DSS.obj : error LNK2028: unresolved token (0A0000DD) "public: virtual void __clrcall GAGenome::copy(class GAGenome const &)"
(?copy@GAGenome@@$$FUAMXABV1@@Z) referenced in function "public: virtual void __clrcall GA1DArrayGenome<int>::copy(class GAGenome const &)" (?copy@?$GA1DArrayGenome@H@@$$FUAMXABVGAGenome@@@Z)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "float __clrcall garan2(void)" (?garan2@@$$FYMMXZ) referenced in function "int __clrcall GARandomInt(int,int)" (?GARandomInt@@$$FYMHHH@Z)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "float __clrcall garan2(void)" (?garan2@@$$FYMMXZ)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "public: virtual __clrcall GAGenome::~GAGenome(void)" (??1GAGenome@@$$FUAM@XZ) referenced in function "public: virtual __clrcall GA1DArrayGenome<int>::~GA1DArrayGenome<int>(void)" (??1?$GA1DArrayGenome@H@@$$FUAM@XZ)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "public: virtual __clrcall GAGenome::~GAGenome(void)"
(??1GAGenome@@$$FUAM@XZ)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "void __clrcall GAErr(class GASourceLocator,char const *,char const *,enum GAErrorIndex,char const *,char const *)" (?GAErr@@$$FYMXVGASourceLocator@@PBD1W4GAErrorIndex@@11@Z) referenced in function "public: virtual int __clrcall GA1DArrayGenome<int>::read(class std::basic_istream<char,struct std::char_traits<char> > &)" (?read@?$GA1DArrayGenome@H@@$$FUAMHAAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "void __clrcall GAErr(class GASourceLocator,char const *,char const *,enum GAErrorIndex,char const *,char const *)" (?GAErr@@$$FYMXVGASourceLocator@@PBD1W4GAErrorIndex@@11@Z)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "public: virtual void __clrcall GAGenome::copy(class GAGenome const &)" (?copy@GAGenome@@$$FUAMXABV1@@Z) referenced in function
"public: virtual void __clrcall GA1DArrayGenome<int>::copy(class GAGenome const &)" (?copy@?$GA1DArrayGenome@H@@$$FUAMXABVGAGenome@@@Z)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "public: virtual void __clrcall GAGenome::copy(class GAGenome const &)" (?copy@GAGenome@@$$FUAMXABV1@@Z)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "int __clrcall GARandomBit(void)" (?GARandomBit@@$$FYMHXZ) referenced in function "public: static int __clrcall GA1DArrayGenome<int>::OnePointCrossover(class GAGenome const &,class GAGenome const &,class GAGenome *,class GAGenome *)" (?OnePointCrossover@?$GA1DArrayGenome@H@@$$FSMHABVGAGenome@@0PAV2@1@Z)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "int __clrcall GARandomBit(void)" (?GARandomBit@@$$FYMHXZ)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "public: __clrcall GAGenome::GAGenome(void
(__clrcall*)(class GAGenome &),int (__clrcall*)(class GAGenome &,float),float (__clrcall*)(class GAGenome const &,class GAGenome const &))" (??0GAGenome@@$$FQAM@P6MXAAV0@@ZP6MH0M@ZP6MMABV0@3@Z@Z) referenced in function "public: __clrcall GA1DArrayGenome<int>::GA1DArrayGenome<int>(unsigned int,float (__clrcall*)(class GAGenome &),void *)" (??0?$GA1DArrayGenome@H@@$$FQAM@IP6MMAAVGAGenome@@@ZPAX@Z)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "public: __clrcall GAGenome::GAGenome(void (__clrcall*)(class GAGenome &),int (__clrcall*)(class GAGenome &,float),float (__clrcall*)(class GAGenome const &,class GAGenome const &))" (??0GAGenome@@$$FQAM@P6MXAAV0@@ZP6MH0M@ZP6MMABV0@3@Z@Z)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "public: static void __clrcall GAGenome::NoInitializer(class GAGenome &)" (?NoInitializer@GAGenome@@$$FSMXAAV1@@Z) referenced in function "public:
__clrcall GA1DArrayGenome<int>::GA1DArrayGenome<int>(unsigned int,float (__clrcall*)(class GAGenome &),void *)" (??0?$GA1DArrayGenome@H@@$$FQAM@IP6MMAAVGAGenome@@@ZPAX@Z)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "public: static void __clrcall GAGenome::NoInitializer(class GAGenome &)" (?NoInitializer@GAGenome@@$$FSMXAAV1@@Z)</div> <div>1>DSS.obj : error LNK2019: unresolved external symbol "float __clrcall Objective(class GAGenome &)" (?Objective@@$$FYMMAAVGAGenome@@@Z) referenced in function "public: void __clrcall IntegerSolver::GAStart(void)" (?GAStart@IntegerSolver@@$$FQ$AAMXXZ)</div> <div>1>IntegerSolver.obj : error LNK2001: unresolved external symbol "float __clrcall Objective(class GAGenome &)" (?Objective@@$$FYMMAAVGAGenome@@@Z)</div> <div>1>D:\proc\DSS\Debug\DSS.exe : fatal error LNK1120: 24 unresolved externals</div> <div>1>Build log was saved at
"file://d:\proc\DSS\DSS\Debug\BuildLog.htm"</div> <div>1>DSS - 33 error(s), 0 warning(s)</div> <div>========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</div> <div>[/error]</div> <div> </div> <div>thank you for your help. </div></FONT><BR><BR><DIV><IMG src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/21.gif"> Anurak Wongwaichaicharoen</DIV><p> 
<hr size=1>Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a>