Hi InMune,

I have a similar problem with my code. In my case I have a native library and a managed WinForms application and when linking the library I get linker errors:

Code:
MainForm.obj : error LNK2028: unresolved token (0A000021) "public: bool __clrcall THERMO_LIB::Thermo::read_database(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?read_database@Thermo ...

MainForm.obj : error LNK2019: unresolved external symbol "public: bool __clrcall THERMO_LIB::Thermo::read_database(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)"
When I create a Win32 console application and link the library, everything works fine. In both cases (console and WinForms application) I only added the library path to the linker options and the lib-file as additional dependency to the linker inputs.

Now why does it work with the native console-application but not with the managed WinForms application? It seems there is a name mangling problem when using WinForms and native library. Does anyone know how to resolve this?