C++ \CLI wrapping native c++ static. Lib of static method fails

Chicken Blood
Chicken Blood used Ask the Experts™
Using vs2010 c++. Net class library project, how to fix unresolved external symbol when calling static class method which coming from static c++. Lib compiled in vs2003?
Doing a dotnet c++ \CLI wrapper on old static mfc c++. Lib.

More info:
1. I got these c++ header files and the associate compiled static *.lib files (Hidden method implementation) from 3rd party vendor software. These files were compiled with old vs2003 which I don't have the source files.
2. These header files show us the method signature that we can invoke in our own project once included them in the MFC C++ project setting (Include Additional Directories/Dependencies).
3. Among the methods provided, one of the method was declared as static method.
4. Now, I'm trying to make C++ .net wrapper class to wrap all the methods provided so that it can be turned out as .net class library and used on other CLR .net projects.
5. I've tried to make it as native C++ dll, but seems too complicated and involves a lot of data types marshalling / and unforeseen memory corruption / crashes.
6. While doing the .net wrapper class and try to invoke the static method, the vs2010 that I use now, said unresolved external symbol for this static method.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Verify project settings:

Directories property page:

Include Directories: path to header file
Library directories: path to .lib file

Linker property page:
Link Library Dependencies: name of de .lib file. Include path if you do not setup library directories.
Visible as com?
evilrixSenior Software Engineer (Avast)

If the C++ libraries have C++ linkage and were originally built using VS2003, you'll not be able to link with them using VS2010 as it uses a different ABI (Application Binary Interface). You'll need to get a set of libs built for VS2010. Microsoft only guarantees C++ ABI compatibility between minor releases.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial