4

Is there some #define I can look at so that I know when to pull in <OpenGLES/EAGL.h>, for instance? Thanks!

1
  • 1
    FYI you can get a list of all of the predefined macros by running the command cpp -dM /dev/null | sort. Aug 17, 2011 at 20:58

2 Answers 2

4

This should work:

#if defined(__OBJC__) && defined(__cplusplus)

For Objective-C just leave off the __cplusplus part

1

You should be able to determine this by running "gcc -v filename" and looking for the arguments to the "cc1" command (-DTHIS, -DTHAT, ...).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.