I am trying to develop a C++ library for an iOS application. This library loads the GLES and OpenAL functions. The idea is to develop a library in C++ and use the same code in iOS and Android (both as native compilation). I am only with the iOS implementation, and I have done a sample application with the library and I have this block inside the library:
#ifdef _IPHONE_4_0
#warning "Including iPhone SDK 4.0 working here" // compiling warning is actived
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
...
#elif __ANDROID_API_ // Android
#warning "Including Android working here" // Compiling warning is not actived
...
#endif
So, the problem comes with the sentence "#ifdef _IPHONE_4_0". If I use it, Xcode can't find the include files, but if I comment all the if clausule (android part too) Xcode can find all of them.
#warning sentences shows that the compiler is reading the iphone part (with and without lines commented) in compilation time. Do I need to use the definition in other way?
Thanks in advance!