From ff108477c35aa4b83b3be14687c0ba512214b47b Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 23 Aug 2000 12:03:01 +0000 Subject: [PATCH] eoCounter? eoEasyEA -- made it copyable again eoEvalFunc -- added specialized eoEvalFuncCounter eoEvolutionStrategy -- nothing much eoGenContinue -- nothing eoPop -- fixed nth_element_fitness eoBitOp -- fixed error in xover eoFileMonitor -- now appends always eoParam -- worked around memory leak in MSC's strstream eoParser -- changed -pconfig_file to @config_file eoParser -- added messages instead of exception when required param is missing eoStat -- added eoDistanceStat t-eoFunctor -- don't know --- eo/src/eo | 2 + eo/src/eoEasyEA.h | 47 ++++++++++++++---------- eo/src/eoEvalFunc.h | 26 +++++++++++++ eo/src/eoEvolutionStrategy.h | 14 +++++++ eo/src/eoGenContinue.h | 14 +++---- eo/src/eoPop.h | 5 ++- eo/src/ga/eoBitOp.h | 3 +- eo/src/utils/eoFileMonitor.cpp | 67 +++++++++++++++++++--------------- eo/src/utils/eoFileMonitor.h | 10 +++-- eo/src/utils/eoParam.h | 3 +- eo/src/utils/eoParser.cpp | 40 ++++++++++++++------ eo/src/utils/eoParser.h | 5 ++- eo/src/utils/eoStat.h | 63 ++++++++++++++++++++++++++++++-- eo/test/t-eoFunctor.cpp | 4 -- eo/win/eo.dsp | 2 +- eo/win/t_eoFunctor.dsp | 14 +++---- 16 files changed, 229 insertions(+), 90 deletions(-) diff --git a/eo/src/eo b/eo/src/eo index e269e968..5b38edac 100644 --- a/eo/src/eo +++ b/eo/src/eo @@ -109,6 +109,8 @@ // aliens //#include +#include +#include //----------------------------------------------------------------------------- // to be continued ... diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index 070452c0..d23bac1b 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -55,9 +55,9 @@ template class eoEasyEA: public eoAlgo eoReplacement& _replace ) : continuator(_continuator), eval(_eval), - selectTransform(0), + selectTransform(dummySelect, dummyTransform), breed(_breed), - mergeReduce(0), + mergeReduce(dummyMerge, dummyReduce), replace(_replace) {} @@ -70,9 +70,9 @@ template class eoEasyEA: public eoAlgo eoReduce& _reduce ) : continuator(_continuator), eval(_eval), - selectTransform(0), + selectTransform(dummySelect, dummyTransform), breed(_breed), - mergeReduce(new eoMergeReduce(_merge, _reduce)), + mergeReduce(_merge, _reduce), replace(mergeReduce) {} @@ -85,9 +85,9 @@ template class eoEasyEA: public eoAlgo eoReplacement& _replace ) : continuator(_continuator), eval(_eval), - selectTransform(new eoSelectTransform(_select, _transform)), + selectTransform(_select, _transform), breed(selectTransform), - mergeReduce(0), + mergeReduce(dummyMerge, dummyReduce), replace(_replace) {} @@ -101,17 +101,15 @@ template class eoEasyEA: public eoAlgo eoReduce& _reduce ) : continuator(_continuator), eval(_eval), - selectTransform(new eoSelectTransform(_select, _transform)), - breed(*selectTransform), - mergeReduce(new eoMergeReduce(_merge, _reduce)), - replace(*mergeReduce) + selectTransform(_select, _transform), + breed(selectTransform), + mergeReduce(_merge, _reduce), + replace(mergeReduce) {} - - ~eoEasyEA() { delete selectTransform; delete mergeReduce; } - + /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { @@ -146,16 +144,27 @@ template class eoEasyEA: public eoAlgo private: - /// dissallow copying cuz of pointer stuff - eoEasyEA(const eoEasyEA&); - /// dissallow copying cuz of pointer stuff - const eoEasyEA& operator=(const eoEasyEA&); + // If selectTransform needs not be used, dummySelect and dummyTransform are used + // to instantiate it. + class eoDummySelect : public eoSelect + { public : void operator()(const eoPop&, eoPop&) {} } dummySelect; + + class eoDummyTransform : public eoTransform + { public : void operator()(eoPop&) {} } dummyTransform; + eoContinue& continuator; eoEvalFunc& eval; - eoSelectTransform* selectTransform; + + eoSelectTransform selectTransform; eoBreed& breed; - eoMergeReduce* mergeReduce; + + // If mergeReduce needs not be used, dummyMerge and dummyReduce are used + // to instantiate it. + eoNoElitism dummyMerge; + eoTruncate dummyReduce; + + eoMergeReduce mergeReduce; eoReplacement& replace; }; diff --git a/eo/src/eoEvalFunc.h b/eo/src/eoEvalFunc.h index 0b174426..41dae963 100644 --- a/eo/src/eoEvalFunc.h +++ b/eo/src/eoEvalFunc.h @@ -44,4 +44,30 @@ template class eoEvalFunc : public eoUnaryFunctor typedef typename EOT::Fitness EOFitT; }; +/** +Counts the number of evaluations actually performed, thus checks first +if it has to evaluate.. etc. +*/ + +#include +template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam +{ + public : + eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "eval_counter") + : func(_func), eoValueParam(0, _name) {} + + void operator()(EOT& _eo) + { + if (_eo.invalid()) + { + value()++; + func(_eo); + } + } + + private : + eoEvalFunc& func; +}; + + #endif \ No newline at end of file diff --git a/eo/src/eoEvolutionStrategy.h b/eo/src/eoEvolutionStrategy.h index 08309dea..ab626116 100644 --- a/eo/src/eoEvolutionStrategy.h +++ b/eo/src/eoEvolutionStrategy.h @@ -81,6 +81,20 @@ class eoEvolutionStrategy: public eoAlgo eoEasyEA easyEA; }; +template +eoEvolutionStrategy make_es(eoContinue& _continuator, + eoEvalFunc& _eval, + eoGOpSelector& _opSel, + float _lambdaRate, + bool _comma) + +{ + if (_comma) + return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::comma_strategy()); + //else + return eoEvolutionStrategy(_continuator, _eval, _opSel, _lambdaRate, eoEvolutionStrategy::plus_strategy()); +} + //----------------------------------------------------------------------------- #endif eoSelectTransformReduce_h diff --git a/eo/src/eoGenContinue.h b/eo/src/eoGenContinue.h index a546702d..a0fcc77f 100644 --- a/eo/src/eoGenContinue.h +++ b/eo/src/eoGenContinue.h @@ -36,13 +36,13 @@ class eoGenContinue: public eoContinue public: /// Ctor for setting a - eoGenContinue( unsigned _totalGens) + eoGenContinue( unsigned long _totalGens) : repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), thisGeneration(thisGenerationPlaceHolder){}; /// Ctor for enabling the save/load the no. of generations counted - eoGenContinue( unsigned _totalGens, unsigned& _currentGen) + eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) : repTotalGenerations( _totalGens ), thisGenerationPlaceHolder(0), thisGeneration(_currentGen){}; @@ -57,21 +57,21 @@ public: /** Sets the number of generations to reach and sets the current generation to 0 (the begin)*/ - virtual void totalGenerations( unsigned _tg ) { + virtual void totalGenerations( unsigned long _tg ) { repTotalGenerations = _tg; thisGeneration = 0; }; /** Returns the number of generations to reach*/ - virtual unsigned totalGenerations( ) + virtual unsigned long totalGenerations( ) { return repTotalGenerations; }; private: - unsigned repTotalGenerations; - unsigned thisGenerationPlaceHolder; - unsigned& thisGeneration; + unsigned long repTotalGenerations; + unsigned long thisGenerationPlaceHolder; + unsigned long& thisGeneration; }; #endif diff --git a/eo/src/eoPop.h b/eo/src/eoPop.h index 7028c80f..8505783c 100644 --- a/eo/src/eoPop.h +++ b/eo/src/eoPop.h @@ -113,11 +113,12 @@ class eoPop: public vector, public eoObject, public eoPersistent struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; Fitness nth_element_fitness(int which) const - { + { // probably not the fastest way to do this, but what the heck + vector fitness(size()); std::transform(begin(), end(), fitness.begin(), GetFitness()); - vector::iterator it = fitness.begin(); + vector::iterator it = fitness.begin() + which; std::nth_element(fitness.begin(), it, fitness.end(), greater()); return *it; } diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 7179b52d..5051199a 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -192,7 +192,7 @@ template class eoBinCrossover: public eoQuadraticOp { unsigned site = rng.random(min(chrom1.size(), chrom2.size())); - if (std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) + if (!std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) { swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); @@ -267,6 +267,7 @@ template class eoBinNxOver: public eoQuadraticOp }; + /** eoBinGxOver --> gene crossover \class eoBinGxOver eoBitOp.h ga/eoBitOp.h \ingroup bitstring diff --git a/eo/src/utils/eoFileMonitor.cpp b/eo/src/utils/eoFileMonitor.cpp index 241f715f..6c64ede8 100644 --- a/eo/src/utils/eoFileMonitor.cpp +++ b/eo/src/utils/eoFileMonitor.cpp @@ -8,34 +8,37 @@ using namespace std; +void eoFileMonitor::printHeader(std::ostream& os) +{ + iterator it = vec.begin(); + + os << (*it)->longName(); + + ++it; + + for (; it != vec.end(); ++it) + { + os << ',' << (*it)->longName(); + } + os << '\n'; +} + +void eoFileMonitor::printHeader() +{ + // create file + ofstream os(filename.c_str()); + + if (!os) + { + string str = "eoFileMonitor: Could not open " + filename; + throw runtime_error(str); + } + + printHeader(os); +} + eoMonitor& eoFileMonitor::operator()(void) { - if (firsttime) - { - firsttime = false; - - // create file - ofstream os(filename.c_str()); - - if (!os) - { - string str = "eoFileMonitor: Could not open " + filename; - throw runtime_error(str); - } - - iterator it = vec.begin(); - - os << (*it)->longName(); - - ++it; - - for (; it != vec.end(); ++it) - { - os << ',' << (*it)->longName(); - } - } - // ok, now the real saving. append to file - ofstream os(filename.c_str(), ios_base::app); if (!os) @@ -44,15 +47,21 @@ eoMonitor& eoFileMonitor::operator()(void) throw runtime_error(str); } - iterator it = vec.begin(); - - os << '\n' << (*it)->getValue(); + return operator()(os); +} +eoMonitor& eoFileMonitor::operator()(std::ostream& os) +{ + iterator it = vec.begin(); + + os << (*it)->getValue(); + for(++it; it != vec.end(); ++it) { os << ',' << (*it)->getValue(); } + os << '\n'; return *this; } diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index 45d889a6..99b4e7fa 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -38,13 +38,17 @@ class eoFileMonitor : public eoMonitor { public : - eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim), firsttime(true) {} + eoFileMonitor(std::string _filename, std::string _delim = ",") : filename(_filename), delim(_delim) {} eoMonitor& operator()(void); + eoMonitor& operator()(std::ostream& os); + + void printHeader(void); + virtual void printHeader(std::ostream& os); + private : - std::string filename; std::string delim; - bool firsttime; + std::string filename; }; #endif diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index dfd6b3fa..e83eb8f8 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -153,7 +153,8 @@ public : std::string getValue(void) const { - std::ostrstream os; + char buf[1024]; + std::ostrstream os(buf, 1023); os << repValue; os << std::ends; return os.str(); diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index cb60c693..07fa0eb5 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -39,7 +39,6 @@ eoParameterLoader::~eoParameterLoader() eoParser::eoParser ( int _argc, char **_argv , string _programDescription, string _lFileParamName, char _shortHand) : programName( _argv[0]), programDescription( _programDescription), - parameterFile("", _lFileParamName, "Load using a configuration file", _shortHand), needHelp(false, "help", "Prints this message", 'h') { strstream stream; @@ -51,15 +50,7 @@ eoParser::eoParser ( int _argc, char **_argv , string _programDescription, strin readFrom(stream); - processParam(parameterFile); processParam(needHelp); - - if (parameterFile.getValue() != parameterFile.defValue()) - { - ifstream is (parameterFile.getValue().c_str()); - - readFrom(is); - } } void eoParser::processParam(eoParam& param, std::string section) @@ -72,7 +63,8 @@ void eoParser::doRegisterParam(eoParam& param) const { if (param.required() && !isItThere(param)) { - throw std::runtime_error("required parameter missing"); + string msg = "required parameter: " + param.longName() + " missing"; + messages.push_back(msg); } pair value = getValue(param); @@ -165,6 +157,24 @@ void eoParser::readFrom(istream& is) shortNameMap[str[1]] = value; } } + if (str[0] == '@') + { // read response file + string filename(str.begin() + 1, str.end()); + + ifstream ifs (filename.c_str()); + + ifs.peek(); // check if it exists + + if (!ifs) + { + string msg = "Could not open response file: " + filename; + throw runtime_error(msg); + } + + // read and overwrite + readFrom(ifs); + break; // stop reading command line + } } updateParameters(); @@ -213,7 +223,14 @@ void eoParser::printOn(ostream& os) const } void eoParser::printHelp(ostream& os) -{ +{ + if (needHelp.value() == false && !messages.empty()) + { + std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); + messages.clear(); + return; + } + // print program name and description os << this->programName <<": "<< programDescription << "\n\n"; @@ -253,6 +270,7 @@ void eoParser::printHelp(ostream& os) os <<". By default: "<second->defValue() << '\n'; } // for p + os << "\n@param_file \t defines a file where the parameters are stored\n"; os << '\n'; } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index de24e8ee..d65278c5 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -127,7 +127,7 @@ public: std::string className(void) const { return "Parser"; } /// true if the user made an error or asked for help - bool userNeedsHelp(void) const { return needHelp.value(); } + bool userNeedsHelp(void) const { return needHelp.value() || !messages.empty(); } /** * Prints an automatic help in the specified output using the information @@ -157,8 +157,9 @@ private: map shortNameMap; map longNameMap; - eoValueParam parameterFile; eoValueParam needHelp; + + mutable std::vector messages; }; diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 142f400c..845fad8a 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -104,19 +104,76 @@ public : }; template -class eoBestFitnessStat : public eoStat +class eoNthElementFitnessStat : public eoStat { public : typedef typename EOT::Fitness Fitness; - eoBestFitnessStat(std::string _description = "Best Fitness") : eoStat(Fitness(), _description) {} + eoNthElementFitnessStat(int _which, std::string _description = "nth element fitness") : which(_which), eoStat(Fitness(), _description) {} virtual void operator()(const eoPop& _pop) { - value() = _pop.nth_element_fitness(0); + if (which > _pop.size()) + throw logic_error("fitness requested of element outside of pop"); + + value() = _pop.nth_element_fitness(which); + } + +private : + unsigned which; +}; + + +template +class eoBestFitnessStat : public eoNthElementFitnessStat +{ +public : + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best Fitness") : eoNthElementFitnessStat(0, _description) {} +}; + +template +class eoDistanceStat : public eoStat +{ +public : + eoDistanceStat(std::string _name = "distance") : eoStat(0.0, _name) {} + + template + double distance(T a, T b) + { + T res = a-b; + return res < 0? -res : res; + } + + double distance(bool a, bool b) + { + return (a==b)? 0 : 1; + } + + void operator()(const eoPop& _pop) + { + double& v = value(); + v = 0.0; + + for (unsigned i = 0; i < _pop.size(); ++i) + { + for (unsigned j = 0; j < _pop.size(); ++j) + { + for (unsigned k = 0; k < _pop[i].size(); ++k) + { + v += distance(_pop[i][k], _pop[j][k]); + } + } + } + + double sz = _pop.size(); + v /= sz * sz * _pop[0].size(); } }; + + /* template class eoStdevStat : public eoStat diff --git a/eo/test/t-eoFunctor.cpp b/eo/test/t-eoFunctor.cpp index ab46f8e3..27ccf995 100644 --- a/eo/test/t-eoFunctor.cpp +++ b/eo/test/t-eoFunctor.cpp @@ -18,7 +18,6 @@ public : }; #include -#include #include #include @@ -46,8 +45,5 @@ int main(void) eo.push_back(1); eo.push_back(2); - eoTranspose transpose; - transpose(eo); - return 1; } \ No newline at end of file diff --git a/eo/win/eo.dsp b/eo/win/eo.dsp index 9e292dc3..abdd0510 100644 --- a/eo/win/eo.dsp +++ b/eo/win/eo.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../src" /I "eo/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0xc0a /d "NDEBUG" # ADD RSC /l 0xc0a /d "NDEBUG" diff --git a/eo/win/t_eoFunctor.dsp b/eo/win/t_eoFunctor.dsp index 35bd3361..77f1fe82 100644 --- a/eo/win/t_eoFunctor.dsp +++ b/eo/win/t_eoFunctor.dsp @@ -41,15 +41,15 @@ RSC=rc.exe # PROP Intermediate_Dir "t_eoFunctor___Win32_Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "t_eoFunctor - Win32 Debug" @@ -63,16 +63,16 @@ LINK32=link.exe # PROP Output_Dir "t_eoFunctor___Win32_Debug" # PROP Intermediate_Dir "t_eoFunctor___Win32_Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF