Bullet Physics With CLR support

saneeshnair
Posts: 11
Joined: Thu Apr 07, 2011 5:59 am

Bullet Physics With CLR support

Post by saneeshnair »

Hi All,
I have built bullet physics with Win32 console application and everything went smooth. Now I created a VC++ Windows forms application with CLR support using VS 2008. When I tried to add the line "#include <btBulletDynamicsCommon.h>" it gives me the error

Error 1 error C2711: 'btMatrix3x3::btMatrix3x3' : this functon cannot be compiled as managed, consider using #pragma unmanaged \src\linearmath\btMatrix3x3.h 62

Error 2 error C3821: 'btMatrix3x3::btMatrix3x3(const btMatrix3x3 &)': managed type or function cannot be used in an unmanaged function \src\linearmath\btMatrix3x3.h 67

What am I missing,
Can anybody help.

Many Thanks,
Saneesh
anthrax11
Posts: 72
Joined: Wed Feb 24, 2010 9:49 pm

Re: Bullet Physics With CLR support

Post by anthrax11 »

You want to include Bullet as unmanaged code:

Code: Select all

#pragma managed(push, off)
#include <btBulletCollisionCommon.h>
#pragma managed(pop)
saneeshnair
Posts: 11
Joined: Thu Apr 07, 2011 5:59 am

Re: Bullet Physics With CLR support

Post by saneeshnair »

Thank you anthrax11, that solved the issue.


Many Thanks,
Saneesh