Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 ~Helgon   Members   

361
Like
0Likes
Like

Posted 27 December 2012 - 10:43 PM

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, 27 December 2012 - 11:40 PM.

from time to time i find time


#2 JiiPee   Members   

135
Like
0Likes
Like

Posted 28 December 2012 - 04:11 AM

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?


See my game dev blog: http://gamedev4hobby.blogspot.fi/




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.