Sign in to follow this  
~Helgon

Call unmanaged code out of managed / c++/cli

Recommended Posts

Hey,

I have a little problem. The situation is that I have a Windows Form on which i render a DirectX frame.

So. The problem I have is that if I want to initialize a XMFLOAT4X4 (<xnamath.h>) I get an error.
I've realized that XMFLOAT4X4, XMVECTORF32, XMVECTOR ... evoke the error. On the other hand XMFLOAT3X3, XMFLOAT3,2 etc. work without any error or warning. Strange

It says:
"__clrcall cannot be used on functions compiled to native code" or
"This function cannot be compiled as managed"

All the problems occur because of this c++/cli - that's for sure because on native C++ all the xnamath stuff work. But I'm sure there must be a solution :/

Any idea how I can handle this problem? I can't imagine that it should not be possible to use the Microsoft's own xnamath lib.

Regards Edited by ~Helgon

Share this post


Link to post
Share on other sites

Can you clarify the problem a little bit? Are you refering to some dll on managed side, which is c++/Cli library, and then you get the compile error when you try to build your application? Or are you just refering to xna library and it gives the error message?

Share this post


Link to post
Share on other sites

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