The linker error message gives a strong hint of what is going wrong. Pay attention to the calling convention __clrcallfor the undefined character, it tells you that the compiler considers these to be "CLR" functions. Managed code, of course, is not, they are __cdecl. There are more names too crippled. Note the "@@ $$ FYM? AW4STATUS @@ E @Z" curses in the title. Which tells you that the compiler thinks they were written in C ++ instead of C.
You need to explicitly tell the compiler about this, the .h file is not compatible enough. What do you do in the C ++ / CLI source code file:
#pragma managed(push, off)
extern "C" {
#include "yadayada.h"
}
#pragma managed(pop)
#pragmas , , . extern "C" {} #include , .h C.