Hi
In my implementation I have a preprocessor definition that specifies the operating system the application is running on, e.g. OS_WIN or OS_LINUX.
In a header file, I have defined the interface, that is the same for each operating system.
//interface.h:
void functionA();
void functionB();
I also have the implementations for the interface for each operating system, e.g.
//windows_interface.c:
#include "interface.h"
void functionA(){
//do something in windows
}
void functionB(){
//do something in windows
}
//linux_interface.c:
#include "interface.h"
void functionA(){
//do something in linux
}
void functionB(){
//do something in linux
}
And now finally the question ;). How can I use now windows_interface implementation when OS_WIN preprocessor is set and how can I use linux_interface.c when OS_LINUX is defined as preprocessor command?
Thanks