NVIDIAGameWorks / PhysX-3.4

NVIDIA PhysX SDK 3.4
https://www.nvidia.com/
2.35k stars 274 forks source link

Build PhysX3.4 hello world error on VS2015 #46

Closed AmNotGod closed 6 years ago

AmNotGod commented 6 years ago

Hey guys, I follow the compile instructions and build libs successfully for vc14x64. It works well when I run snippets. However, When I build a new win32 console project on VS2015(include ..\PhysX_3.4\Include and ..\PhysX_3.4\Lib\vc14win64) and try to run following source code:


include "PxPhysicsAPI.h"

include

using namespace std; using namespace physx;

int main() { PxVec3 v(0, 0, 0); cout << "Hello World" << endl; return 0; }

There are thousands of compile errors:

Severity Code Description Project File Line Suppression State Error (active) member "PxControllerDesc::PX_INLINE" is not a type name Test c:\Users\gzzhengqingxin\Desktop\TASK\PhysX-3.4-master\PhysX_3.4\Include\characterkinematic\PxBoxController.h 56
Error (active) member function with the same name as its class must be a constructor Test c:\Users\gzzhengqingxin\Desktop\TASK\PhysX-3.4-master\PhysX_3.4\Include\characterkinematic\PxBoxController.h 56
Error (active) this declaration has no storage class or type specifier Test c:\Users\gzzhengqingxin\Desktop\TASK\PhysX-3.4-master\PhysX_3.4\Include\characterkinematic\PxBoxController.h 57
Error (active) expected a ';' Test c:\Users\gzzhengqingxin\Desktop\TASK\PhysX-3.4-master\PhysX_3.4\Include\characterkinematic\PxBoxController.h 57
Error (active) member "physx::PxBoxControllerDesc::PX_INLINE" is not a type name Test c:\Users\gzzhengqingxin\Desktop\TASK\PhysX-3.4-master\PhysX_3.4\Include\characterkinematic\PxBoxController.h 67
Error (active) expected a ';' Test c:\Users\gzzhengqingxin\Desktop\TASK\PhysX-3.4-master\PhysX_3.4\Include\characterkinematic\PxBoxController.h 67


HELP! HELP! Am I missing something important????

AlesBorovicka commented 6 years ago

Hi, I was not able to reproduce the issue you see. Error (active) member "PxControllerDesc::PX_INLINE" is not a type name Test This error looks very odd, would it be possible that you have some namespace Test opened before the include of PhysX?

AmNotGod commented 6 years ago

Sorry, I am too busy to view your comments . It turn out to be some namespace error.... Thank you very much!