You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Redefinition of 'NSWindow' as a different kind of symbol
Redefinition of 'NSOpenGLContext' as a different kind of symbol
Redefinition of 'NSBitmapImageRep' as a different kind of symbol
Im on Mac 64bit using XCode 4.2 and Mac OS SDK 10.7.
I have tried using macros __cplusplus, removing the forward declarations and/or changing class to @class but it didn't fix the problem.
Has someone gone through this problem and fixed it. Please advise.
Are you using the current stable version, or a more recent SVN/trunk version? Because we fixed a lot of errors with newer OSX versions for the upcoming Irrlicht 1.8. Irrlicht 1.7.3 will probably not compile under OSX 10.7
Solution:
I changed my compiler to LLVM GCC 4.2 from Apple LLVM Compiler 3.0.
It seems that there are issues with mixing C++ and Objective-C in Apple LLVM Compiler 3.0.
Irrlicht 1.7.2 is compatible with Mac if you use GCC compiler and not the faulty Apple compiler.
If You use 10.7 or 10.6 SDK, You should also use Irrlicht from SVN, because 1.7.x have a problems with MacOS X Lion (eg. fullscreen doesn't work on my MacBook with NVIDIA GFX with 10.7 SDK). Switch to a GCC only fix compile issues, but it doesn't solve deprecated methods problems, which are removed from SVN version.
As a note, I wanted to get Irr compiling using the latest Os X sdk and also using Clang instead of Gcc since all my other code is working under that setup. After running into the issue with the class redefinitions, I poked into the problem and found a quick and simple solution. Wrap the class references as follows:
#ifndef __OBJC__
class NSWindow;
class NSOpenGLContext;
class NSBitmapImageRep;
#endif
All the C++ code see's the opaque pointers as intended and the ObjC code uses the proper definitions from foundation and appkit. Other than a couple of the demo's failing clean shutdown, everything works like a charm.