2

I'm trying to write a managed C++ wrapper for a native C++ library. I have .lib and .h header files. I followed the steps in http://tom-shelton.net/index.php/2008/12/11/creating-a-managed-wrapper-for-a-lib-file/

I finished wrapper, and referenced the wrapper DLL from a C# project. All build fine. However wehen I try to run C# project, it quits with exception; 'System.IO.FileNotFoundException' . It says that it can not find my wrapper DLL or one of its dependencies.

Since I'm sure that my wrapper DLL is found, I tried to debug the missing dependency of the wrapper using Dependency Walker. I loaded the wrapper DLL into it, and it shows that my native library DLL is missing.

Now I'm confused. I did not use the native DLL, I used lib and header. Then, why it still tries to find the native DLL file which is of course missing? Is there a configuration problem in Visual Studio?

Thanks

UnfoX
  • 135
  • 1
  • 12
  • 3
    Perchance is your "lib" an [**import library**](http://stackoverflow.com/questions/3573475/how-does-the-import-library-work-details). ? It would seem so. – WhozCraig Jul 11 '16 at 08:06
  • @WhozCraig , yes it is. Thank you for the point. – UnfoX Jul 11 '16 at 10:40

0 Answers0