Jump to content
  • Advertisement
Sign in to follow this  
rfterdarc

novodex and clr

This topic is 4418 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!