Search code examples
c++c++-cliunmanagedmanaged

How to expose native to managed - C++/CLI on x64 Platform


I have a static lib in my project and I want to use this in my .net project. I have taken this project as a starting point. Exposing native to managed - C++/CLI

My use case is the Second Approach.

So far everything works, but when I change the architecture from x86 to x64 I get a lot of linker errors:

enter image description here

Currently I do not understand where the problem is and why these errors come:


Solution

  • Do you change library when switching architecture? If not the linker would look for the wrong mangled