Hey everyone,
I’m trying to build PhysX 3.3 for Mac OS X with 64 bit to include the libraries into another project. I have OS X Yosemite 10.10 and Xcode 7.0. Just opening and building the Xcode project provided in the compiler folder gave me several errors, so I decided to build it via the Makefiles with GNU Make 3.81 provided in the same folder structure. It seems that my compiler (I’m using clang 600) is rather strict and sees things as errors, where other compilers would be more forthcoming.
I encountered the following errors:
- "This macro is a reserved identifier" concerning variables beginning with an underscore and a capital letter, as they would be reserved for compiler identifiers, I think.
- "unused typedef 'PxCompileTimeAssert_Dummy' [-Werror,-Wunused-local-typedef]" concerning the definition of PX_COMPILE_TIME_ASSERT which is used in several other files, where this error is issued during compilation. I managed to turn this error off setting cppflags
But now I get an error I don’t see myself bypassing just so easily:
Some header definitions begin with a double underscore: __ . This is usually reserved for any compiler generated definitions, I found out, and, as clang is rather strict, i throws the following error:
In file included from ./…/…/PhysX/src/GrbEvents.cpp:14:
./…/…/PhysX/src/GrbSceneEventDescs.h:15:9: error: macro name is a reserved identifier
[-Werror,-Wreserved-id-macro]
#define GRB_SCENE_EVENT_DESCS_H
^
In file included from ./…/…/PhysX/src/GrbEvents.cpp:14:
In file included from ./…/…/PhysX/src/GrbSceneEventDescs.h:38:
./…/…/PhysX/src/GrbStackAllocator.h:15:9: error: macro name is a reserved identifier
[-Werror,-Wreserved-id-macro]
#define GRB_STACK_ALLOC_H
^
2 errors generated.
make: *** [build/PhysX_debug/PhysX/src/GrbEvents.cpp.o] Error 1
Annas-MacBook-Pro:make_osx64 Anna$ make debug
building …/…/…/Lib/osx64/libPhysX3CookingDEBUG.a complete!
PhysX: compiling debug ./…/…/PhysX/src/GrbEvents.cpp…
In file included from ./…/…/PhysX/src/GrbEvents.cpp:14:
./…/…/PhysX/src/GrbSceneEventDescs.h:15:9: error: macro name is a reserved identifier
[-Werror,-Wreserved-id-macro]
#define GRB_SCENE_EVENT_DESCS_H
^
In file included from ./…/…/PhysX/src/GrbEvents.cpp:14:
In file included from ./…/…/PhysX/src/GrbSceneEventDescs.h:38:
./…/…/PhysX/src/GrbStackAllocator.h:15:9: error: macro name is a reserved identifier
[-Werror,-Wreserved-id-macro]
#define GRB_STACK_ALLOC_H
^
2 errors generated.
make: *** [build/PhysX_debug/PhysX/src/GrbEvents.cpp.o] Error 1
Annas-MacBook-Pro:make_osx64 Anna$ make debug
building …/…/…/Lib/osx64/libPhysX3CookingDEBUG.a complete!
PhysX: compiling debug ./…/…/PhysX/src/GrbEvents.cpp…
In file included from ./…/…/PhysX/src/GrbEvents.cpp:14:
./…/…/PhysX/src/GrbSceneEventDescs.h:15:9: error: macro name is a reserved identifier
[-Werror,-Wreserved-id-macro]
#define GRB_SCENE_EVENT_DESCS_H
^
In file included from ./…/…/PhysX/src/GrbEvents.cpp:14:
In file included from ./…/…/PhysX/src/GrbSceneEventDescs.h:38:
./…/…/PhysX/src/GrbStackAllocator.h:15:9: error: macro name is a reserved identifier
[-Werror,-Wreserved-id-macro]
#define GRB_STACK_ALLOC_H
Does anyone know, what I have to do, to finally get PhysX to properly build?