Hi InMune,

right, my lib had only unmanaged classes. Sorry, thought I had found a solution to your problem.


Just for the record, after a night of trying different things I managed to get my native c++ library linked together with a Windows Forms Application. Here's the catch:

1. In the CLR - console project, with target Static Library, set the compiler option:
Configuration properties -> General -> Common Language Runtime Support = Pure MSIL Common Language Runtime Support

(must be the same as in the Windows Forms Application, otherwise you get a linker error)

2. Set the library dependencies in your solution, so that your WinForms app has the library at dependency

3. Set the following linker option in the WinForms app:
Linker->General->Use Library Dependency Inputs = Yes

With these settings, you don't even have to specify additional library directories or the library files.

Ghorwin