From 11be20aefa012ef1ba82e1ca6815f5f089d3c758 Mon Sep 17 00:00:00 2001 From: jmerelo Date: Wed, 10 Feb 1999 17:14:08 +0000 Subject: [PATCH] Added some files, compiled some stuff in VC++, and finished eoOpSelMason --- eo/src/eoBin.h | 12 ++--- eo/src/eoBitOp.h | 29 ++++++----- eo/src/eoData.h | 41 ++++++++++++++++ eo/src/eoInsertion.h | 37 +++++++------- eo/src/eoLottery.h | 1 - eo/src/eoObject.h | 7 +-- eo/src/eoOp.h | 10 ++-- eo/src/eoOpFactory.h | 2 +- eo/src/eoOpSelMason.h | 49 +++++++++++++------ eo/win/EO.dsw | 36 +++++++++----- eo/win/t_eoinsertion.dsp | 100 ++++++++++++++++++++++++++++++++++++++ eo/win/t_lottery.dsp | 12 ++--- eo/win/t_opselmason.dsp | 101 +++++++++++++++++++++++++++++++++++++++ eo/win/t_pop.dsp | 4 ++ 14 files changed, 360 insertions(+), 81 deletions(-) create mode 100644 eo/src/eoData.h create mode 100644 eo/win/t_eoinsertion.dsp create mode 100644 eo/win/t_opselmason.dsp diff --git a/eo/src/eoBin.h b/eo/src/eoBin.h index 91ce6b09..c5031dec 100644 --- a/eo/src/eoBin.h +++ b/eo/src/eoBin.h @@ -17,6 +17,7 @@ * based on STL's bit_vector (vector). * *****************************************************************************/ + template class eoBin: public eoVector { public: @@ -37,14 +38,9 @@ template class eoBin: public eoVector generate(begin(), end(), rnd); } - /** - * Constructor from istream. - * @param is The istream to read from. - */ - eoBin(istrstream& is) - { - readFrom(is); - } + /// Constructor from istream. + /// @param is The istream to read from. + eoBin(istream& _is):eoVector(_is){}; /// My class name. string className() const diff --git a/eo/src/eoBitOp.h b/eo/src/eoBitOp.h index 98eea6e7..7f37ae52 100644 --- a/eo/src/eoBitOp.h +++ b/eo/src/eoBitOp.h @@ -10,16 +10,23 @@ #include // eoBin #include // eoMonOp -#ifdef _MSC_VER -#define min _MIN -#define max _MAX -#endif - - -//----------------------------------------------------------------------------- -// eoBinRandom --> mofify a chromosome in a random way -//----------------------------------------------------------------------------- - + +/** @name BitWise Genetic operators + +Even as these operators might seem general, they are particular versions of genetic +operators useful only for binary operators. As any set of genetic operators, it must +have a factory that knows how to build them from a description +@author GeNeura Team +@version 0.1 +@see eoBin +@see eoBitOpFactory +*/ + +//@{ + +/** + eoBinRandom --> mofify a chromosome in a random way +*/ template class eoBinRandom: public eoMonOp { public: @@ -345,5 +352,5 @@ template class eoBinUxOver: public eoBinOp }; //----------------------------------------------------------------------------- - +//@} #endif eoBitOp_h diff --git a/eo/src/eoData.h b/eo/src/eoData.h new file mode 100644 index 00000000..1b31eab7 --- /dev/null +++ b/eo/src/eoData.h @@ -0,0 +1,41 @@ +//----------------------------------------------------------------------------- +// eoData.h +//----------------------------------------------------------------------------- + +#ifndef EODATA_H +#define EODATA_H + +//----------------------------------------------------------------------------- + +#include // vector +#include // set +#include // string + +using namespace std; + + +#ifdef _MSC_VER + #include // MAXDOUBLE + #define MAXFLOAT numeric_limits::max() + #define MINFLOAT numeric_limits::min() + #define MAXDOUBLE numeric_limits::max() + #define MAXINT numeric_limits::max() + #define min _MIN + #define max _MAX +#else + #include + #ifndef MAXFLOAT + #define MAXFLOAT (float)1e127 + #define MAXDOUBLE (double)1.79769313486231570e+308 + #define MAXINT 2147483647 + #endif +#endif + +#ifndef _MSC_VER +#include +#define _isnan isnan +#endif + +//----------------------------------------------------------------------------- + +#endif npi_DATATYPES_H diff --git a/eo/src/eoInsertion.h b/eo/src/eoInsertion.h index 3c6d90a9..17440d39 100644 --- a/eo/src/eoInsertion.h +++ b/eo/src/eoInsertion.h @@ -11,44 +11,39 @@ /****************************************************************************** * eoInsertion: A replacement algorithm. - * Creates a new population with all the breeders and the best individuals - * from the original population. + * Takes two populations: breeders and original populations. At the en of the + * process, the original population has chenge in the followin way: + * (1) the worst individuals haa been erased + * (2) the best individuals from the breeders has been added *****************************************************************************/ template class eoInsertion: public eoMerge { public: /// (Default) Constructor. - eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} + eoInsertion(const float& _rate = 1.0): eoMerge(_rate) {} /** - * Creates a new population based on breeders and original populations. + * Creates a new population based on breeders and original population * @param breeders The population of breeders. * @param pop The original population. */ void operator()(const eoPop& breeders, eoPop& pop) { - int new_size = static_cast(pop.size() * rate()); - cout << "new_size = " << new_size << endl; + sort(pop.begin(), pop.end()); - if (new_size == breeders.size()) - { - pop = breeders; - } - else if (new_size < breeders.size()) - { - pop = breeders; - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), pop.begin() - new_size + pop.size()); - } + if (rated() > 1) + pop.erase(pop.end() + + (int)(pop.size() * (rate() - 1) - breeders.size()), + pop.end()); else { - sort(pop.begin(), pop.end()); - pop.erase(pop.begin(), - pop.begin() + breeders.size() + pop.size() - new_size); - copy(breeders.begin(), breeders.end(), - back_insert_iterator >(pop)); + cout << "eoInsertion no funciona con rate < 1" + exit(1); } + + copy(breeders.begin(), breeders.end(), + back_insert_iterator >(pop)); } }; diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index f2dcefb6..20c4eadf 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -9,7 +9,6 @@ #include -#include // MINFLOAT #include // accumulate #include // eoPop eoSelect diff --git a/eo/src/eoObject.h b/eo/src/eoObject.h index 48e4945a..cfc5f8fa 100644 --- a/eo/src/eoObject.h +++ b/eo/src/eoObject.h @@ -9,9 +9,10 @@ #define EOOBJECT_H //----------------------------------------------------------------------------- - -#include // istream, ostream -#include // para string + +#include // For limits definition +#include // istream, ostream +#include // para string using namespace std; diff --git a/eo/src/eoOp.h b/eo/src/eoOp.h index 20aeeff9..d12a162a 100644 --- a/eo/src/eoOp.h +++ b/eo/src/eoOp.h @@ -16,9 +16,13 @@ What is a genetic algorithm without genetic operators? There is a genetic operator hierarchy, with eoOp as father and eoMonOp (monary or unary operator) and eoBinOp (binary operator) as siblings. Nobody -should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here. +should subclass eoOp, you should subclass eoBinOp or eoMonOp, those are the ones actually used here.\\ +#eoOp#s are only printable objects, so if you want to build them from a file, it has to +be done in another class, namely factories. Each hierarchy of #eoOp#s should have its own +factory, which know how to build them from a description in a file. @author GeNeura Team -@version 0.0 +@version 0.1 +@see eoOpFactory */ //@{ @@ -57,7 +61,7 @@ public: */ virtual void printOn(ostream& _os) const { _os << className(); - _os << arity; +// _os << arity; }; /** Inherited from eoObject diff --git a/eo/src/eoOpFactory.h b/eo/src/eoOpFactory.h index 540e68d8..9ffe402b 100644 --- a/eo/src/eoOpFactory.h +++ b/eo/src/eoOpFactory.h @@ -60,7 +60,7 @@ public: throw objectTypeStr; } return opPtr; - } + }; }; diff --git a/eo/src/eoOpSelMason.h b/eo/src/eoOpSelMason.h index 2497433d..d8fb0722 100644 --- a/eo/src/eoOpSelMason.h +++ b/eo/src/eoOpSelMason.h @@ -9,7 +9,10 @@ #define _EOOPSELMASON_H //----------------------------------------------------------------------------- -#include +#include +#include // for eoFactory and eoOpFactory + +#include //----------------------------------------------------------------------------- @@ -19,14 +22,16 @@ template class eoOpSelMason: public eoFactory > { public: - + typedef vector* > vOpP; + typedef map*, vOpP > MEV; + /// @name ctors and dtors //{@ /// constructor - eoOpSelMason( ) {} + eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; /// destructor - virtual ~eoOpSelMason() {} + virtual ~eoOpSelMason() {}; //@} /** Factory methods: creates an object from an istream, reading from @@ -41,33 +46,47 @@ public: from outside, using the #destroy# method */ virtual eoOpSelector* make(istream& _is) { + string opSelName; _is >> opSelName; - eoMonOpFactory selMaker; + eoOpSelector* opSelectorP; + // Build the operator selector + if ( opSelName == "eoProportionalOpSel" ) { + opSelectorP = new eoProportionalOpSel(); + } + + // Temp vector for storing pointers + vOpP tmpPVec; // read operator rate and name while ( _is ) { float rate; _is >> rate; - + if ( _is ) { + eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line + // Add the operators to the selector, donīt pay attention to the IDs + opSelectorP->addOp( *op, rate ); + // Keep it in the store, to destroy later + tmpPVec.push_back( op ); + } // if + } // while - // Create an stream - strstream s0; - eoMonOp* op0 = selMaker.make( s0 ); - } - - } + // Put it in the map + allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); + + return opSelectorP; + }; ///@name eoObject methods //@{ /** Return the class id */ - virtual string className() const { return "eoFactory"; } + virtual string className() const { return "eoOpSelMason"; } - /** Read and print are left without implementation */ //@} private: map*,vector* > > allocMap; + eoOpFactory& operatorFactory; }; -#endif _EOFACTORY_H +#endif _EOOPSELMASON_H diff --git a/eo/win/EO.dsw b/eo/win/EO.dsw index 1feab840..cddc547a 100644 --- a/eo/win/EO.dsw +++ b/eo/win/EO.dsw @@ -15,18 +15,6 @@ Package=<4> ############################################################################### -Project: "prueba"=.\prueba\prueba.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "t_eoaged"=.\t_eoaged.dsp - Package Owner=<4> Package=<5> @@ -75,6 +63,18 @@ Package=<4> ############################################################################### +Project: "t_eoinsertion"=.\t_eoinsertion.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_eornd"=.\t_eornd.dsp - Package Owner=<4> Package=<5> @@ -195,6 +195,18 @@ Package=<4> ############################################################################### +Project: "t_opselmason"=.\t_opselmason.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "t_pop"=.\t_pop.dsp - Package Owner=<4> Package=<5> diff --git a/eo/win/t_eoinsertion.dsp b/eo/win/t_eoinsertion.dsp new file mode 100644 index 00000000..1f2e7d87 --- /dev/null +++ b/eo/win/t_eoinsertion.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="t_eoinsertion" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_eoinsertion - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_eoinsertion.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_eoinsertion.mak" CFG="t_eoinsertion - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_eoinsertion - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_eoinsertion - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_eoinsertion - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "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 BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /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 + +!ELSEIF "$(CFG)" == "t_eoinsertion - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_eoinsertion___Win32_Debug" +# PROP BASE Intermediate_Dir "t_eoinsertion___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_eoinsertion___Win32_Debug" +# PROP Intermediate_Dir "t_eoinsertion___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 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /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 + +!ENDIF + +# Begin Target + +# Name "t_eoinsertion - Win32 Release" +# Name "t_eoinsertion - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\test\t-eoinsertion.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_lottery.dsp b/eo/win/t_lottery.dsp index b06d1ac4..32f407dc 100644 --- a/eo/win/t_lottery.dsp +++ b/eo/win/t_lottery.dsp @@ -48,8 +48,8 @@ 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_lottery - Win32 Debug" @@ -64,16 +64,16 @@ LINK32=link.exe # PROP Intermediate_Dir "t_lottery___Win32_Debug" # PROP Ignore_Export_Lib 0 # 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 /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 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0xc0a /d "_DEBUG" # ADD RSC /l 0xc0a /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 eo.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 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 eo.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 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 diff --git a/eo/win/t_opselmason.dsp b/eo/win/t_opselmason.dsp new file mode 100644 index 00000000..155f3acb --- /dev/null +++ b/eo/win/t_opselmason.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="t_opselmason" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=t_opselmason - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "t_opselmason.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "t_opselmason.mak" CFG="t_opselmason - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "t_opselmason - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "t_opselmason - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "t_opselmason - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "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 BASE RSC /l 0xc0a /d "NDEBUG" +# ADD RSC /l 0xc0a /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 + +!ELSEIF "$(CFG)" == "t_opselmason - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "t_opselmason___Win32_Debug" +# PROP BASE Intermediate_Dir "t_opselmason___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "t_opselmason___Win32_Debug" +# PROP Intermediate_Dir "t_opselmason___Win32_Debug" +# PROP Ignore_Export_Lib 0 +# 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 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0xc0a /d "_DEBUG" +# ADD RSC /l 0xc0a /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 eo.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 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 + +# Begin Target + +# Name "t_opselmason - Win32 Release" +# Name "t_opselmason - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\test\t_opselmason.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/eo/win/t_pop.dsp b/eo/win/t_pop.dsp index 34a66eaf..3f7d6b3f 100644 --- a/eo/win/t_pop.dsp +++ b/eo/win/t_pop.dsp @@ -86,6 +86,10 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=..\test\t_opselmason.cpp +# End Source File +# Begin Source File + SOURCE=..\test\t_pop.cpp # End Source File # End Group