• Advertisement
Sign in to follow this  

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

This topic is 1879 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

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
Advertisement

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
Sign in to follow this  

  • Advertisement