Problem Integrate PhysX 2.7

Aranel

10-02-2007 09:35:48

Hi All,

I add my project #include "NxPhysics.h"
The ogre minimal project (class TutorialApplication)...
but compiller (VC++ 8 ) output error message:

c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : error C2238: unexpected token(s) preceding ';'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(503) : warning C4002: too many actual parameters for macro 'malloc'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(503) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(503) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(503) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(503) : error C2535: 'void *NxUserAllocator::instance(void)' : member function already defined or declared
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : see declaration of 'NxUserAllocator::instance'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(504) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(523) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(523) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(523) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(523) : error C2535: 'void *NxUserAllocator::instance(void)' : member function already defined or declared
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : see declaration of 'NxUserAllocator::instance'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(523) : error C2238: unexpected token(s) preceding ';'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(535) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(535) : error C3254: 'NxUserAllocator' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(535) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(535) : error C2556: 'void NxUserAllocator::instance(void)' : overloaded function differs only by return type from 'void *NxUserAllocator::instance(void)'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(487) : see declaration of 'NxUserAllocator::instance'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(535) : error C2040: 'NxUserAllocator::instance' : 'void (void)' differs in levels of indirection from 'void *(void)'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxuserallocator.h(535) : error C2238: unexpected token(s) preceding ';'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(36) : warning C4002: too many actual parameters for macro 'malloc'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(36) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(36) : error C3254: 'NxAllocatorDefault' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(36) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(37) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(76) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(76) : error C3254: 'NxAllocatorDefault' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(76) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(76) : error C2535: 'void *NxAllocatorDefault::instance(void)' : member function already defined or declared
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(36) : see declaration of 'NxAllocatorDefault::instance'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(77) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(88) : error C2143: syntax error : missing ';' before '.'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(88) : error C3254: 'NxAllocatorDefault' : class contains explicit override 'instance' but does not derive from an interface that contains the function declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(88) : error C2838: 'instance' : illegal qualified name in member declaration
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(88) : error C2556: 'void NxAllocatorDefault::instance(void)' : overloaded function differs only by return type from 'void *NxAllocatorDefault::instance(void)'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(36) : see declaration of 'NxAllocatorDefault::instance'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(88) : error C2040: 'NxAllocatorDefault::instance' : 'void (void)' differs in levels of indirection from 'void *(void)'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(89) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(59) : error C2589: '::' : illegal token on right side of '::'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxallocatordefault.h(59) : error C2059: syntax error : '::'
c:\program files\ageia technologies\ageia physx sdk\v2.7.0\sdks\foundation\include\nxmath.h(42) : fatal error C1189: #error : Error: min or max is #defined, probably in <windows.h>. Put #define NOMINMAX before including windows.h to suppress windows global min,max macros.

betajaen

10-02-2007 10:01:54

Are you using NxOgre or is this your own work?

This is how I include Ogre and PhysX in NxOgre, you should do the same:
#include <Ogre.h>
#include <OgreNoMemoryMacros.h>
#include <NxPhysics.h>
#include "ControllerManager.h"
#include <OgreMemoryMacros.h>

Aranel

10-02-2007 10:32:33

Are you using NxOgre or is this your own work?
No, I using only PhysX SDK without NxOgre

Aranel

11-02-2007 10:25:44

I decideв this problem...
Necessary tuning project and include NxPhysics.h global namespace project.
p.s.: sorry my english %)