B
BDob
If to write portable code, I want to have "selective compiling." I am not
sure if this is the right term.
Basically it should work like this:
#define WIN32_COMPILE
class MyClass
{
void MySampleMethod(void);
};
void MyClass::MySampleMethod(void)
{
/*Code scope A*/
...
/Code scope B*/
...
}
If WIN32_COMPILE defined, I want all statements in Code scope A be compiled and linked into an EXE. Otherwise, Code scope B into the EXE.
Could someone explain to me how this can be done?
Also, any other advices and tips for writing portable code are welcome.
Many thanks!
sure if this is the right term.
Basically it should work like this:
#define WIN32_COMPILE
class MyClass
{
void MySampleMethod(void);
};
void MyClass::MySampleMethod(void)
{
/*Code scope A*/
...
/Code scope B*/
...
}
If WIN32_COMPILE defined, I want all statements in Code scope A be compiled and linked into an EXE. Otherwise, Code scope B into the EXE.
Could someone explain to me how this can be done?
Also, any other advices and tips for writing portable code are welcome.
Many thanks!