Sign in to follow this  

novodex and clr

This topic is 4202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im working on a physx wrapper for .net (2.0), and kept getting an error when creating an actor, so made a new project and cut the c++ code down to: #include "stdafx.h" #include <NxPhysics.h> #include <NxActor.h> #include <NxActorDesc.h> int main() { // Initialize PhysicsSDK NxPhysicsSDK* sdk = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION ); // Create a scene NxSceneDesc sceneDesc; NxScene* gScene = sdk->createScene(sceneDesc); NxActorDesc actorDesc; NxActor* actor = gScene->createActor(actorDesc); return 0; } if i compile the app with /clr, then the 'actor' variable is NULL after calling createActor, if i compile the same code but without the /clr switch (normal unmanaged c++), 'actor' is created successfully any ideas why the clr would cause this? using: visual studio 2005, c++, .net 2.0, physx sdk 2.3.3

Share this post


Link to post
Share on other sites
i found a HAXZOR way of fixing this problem.

wrap the function in:
#pragma managed(push, off)

function(...)

#pragma managed(pop)

thus disabling managed code in between

( hopfully someone can come up with a nicer solution :) )

Share this post


Link to post
Share on other sites

This topic is 4202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this