Skip to main content
gamedev.net
🔒 Locked

Using Unmanaged Static Libs with Managed C++

Started by Vincent_M Sep 25, 2010 at 3:36 AM 0 replies 450+ views
Original Post
Vincent_M
Vincent_M
I built my multi-platform game engine, now I want to build a Windows-based tile map editor application for it. I am going to use Windows Forms in C++ to build it. Now, my Visual Studio solution has two projects: my engine that builds into a library, and my managed C++ tile editor. Now, when I include my unmanaged engine headers in my managed project, I do it like this:
#pragma#include "Catalyst.h" // includes all the necessary engine headers#pragma


Now, when I go to build my project, I 102 errors (stops after 100). Here is the first error I receive to give you an idea of what I'm getting:
Quote:

Error 78 error C3642: '_onexit_m_t _onexit_m_appdomain(_onexit_m_t)' : cannot call a function with __clrcall calling convention from native code C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h 746


All of my errors end with:
Quote:

__clrcall calling convention from native code


or
Quote:

managed type or function cannot be used in an unmanaged function

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.