Question

In Photoshop CS2 SDK file SPConfig.h, the follow code get error.Obviously I needed the define of __MWERKS__. The Compiler is LLVM GCC 4.2, the SDK is OS X 10.7 .

#ifdef __MWERKS__
#if !defined(__INTEL__) /* mjf was- #if defined(__MC68K__) || defined(__POWERPC__) */
#ifndef MAC_ENV
#define MAC_ENV 1
#endif
#endif
#endif

#if !defined(WIN_ENV) && !defined(MAC_ENV)
#error
#endif

In file cdefs.h:

#if defined(__MWERKS__) && (__MWERKS__ > 0x2400)

I want to know how to find where it defines. Or can I just define a number to it?

Was it helpful?

Solution

Those macros are defined by the compiler itself to indicate which compiler it is (so you can write compiler-specific things).

__MWERKS__ was used by Metrowerks CodeWarrior, which was discontinued in 2005, so is slightly obsolete by now.
You should not define it yourself - unless you're compiling with CodeWarrior, those parts should be skipped, or the program will most likely break in unpredictable ways.

Your actual problem is that your compiler & SDK combination isn't recognized as a Macintosh environment.

There must be some other place that defines MAC_ENV.
(I find it hard to believe that the CS2 SDK wouldn't support Apple's own compiler.)
You should go search for all occurrences of MAC_ENV.

Are you sure that the combination of SDKs and compiler you're using is supported?
The CS2 SDK is so old it might not be, so you should also read the documentation carefully.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top