views:

425

answers:

1

Here is the code for my head file...

#pragma once
#pragma unmanaged

__declspec(dllexport) public void CallMe(wchar_t *p);

Here is all the code SO FAR for my definition file...

LIBRARY "CppWrapper"

My "CallMe" function's name compiles to "?CallMe@@YAXPA_W@Z". What do I need to add/write in my .def file to correct the compiled name to "CallMe". Also, are there any other steps (or gotchas) I should be aware of?

+2  A: 

You need an extern "C" { } block around your definitions to avoid the C++ name mangling.

jcopenha