I am working on a plugin in which I need to #include
a header file (let's say some_file.h
) which in turn includes environ.h
. Now, when I build my plugin, the build fails with some errors in the environ.h
file and some other dependent files. Here's a code sample from environ.h
where the error is occurring:
#ifndef PLATFORM
#ifdef WIN_ENV
#define PLATFORM "winpltfm.h"
#elif __OS2__
#define PLATFORM "os2pltfm.h"
#elif defined(unix) || defined(__unix)
#define PLATFORM "UnixPlatform.h"
#else
#error You must define the PLATFORM macro <------- Error-1
#endif
#endif
#include PLATFORM <------- Error-2
The Error-1 is: #error you must define the platform macro
and Error-2 is easy to guess: Expected <filename> or "filename"
.
The strange thing is that some other plugin where some_file.h
is included works fine i.e. builds successfully. This made me think that there must be some build settings which might be different.
Can anyone suggest what should be done in such a case to remove the errors from the environ.h
header file?
Note: I am working on MAC OS X in Xcode.