0

I have a legacy project that used to be build in Visual C++ 2005 Express, and it depends on a certain third party DLL. As far as I can tell it doesn't come with a lib or header file.

The project compiles fine in Visual C++ 2005, here is a screenshot showing the DLL visible and browsable in the object explorer. The code can also use it without #include or anything like that, which is pretty weird.

2005 original

Importing the project into Visual Studio 2019 works as well, the code can still use the DLL and it is listed under both the dependencies and the references:

2019 imported

I now want to achieve the same thing in a new project, but I cannot figure out how to register the DLL as a dependency. Things I found online and tried:

How do I register the DLL as a dependency? And where does Visual C++ 2005 get the list of methods in the DLL from is the first place?

user7860670
  • 35,849
  • 4
  • 58
  • 84
Todd Sewell
  • 1,444
  • 12
  • 26
  • Perhaps it is a c++-cli or C# library? Note that dlls never participate in C++ build process and there is no way to make it a dependency. – user7860670 Aug 14 '19 at 10:02
  • The best thing in life now is to read a book or a couple of tutorials on the differences between managed and unmanaged code before starting working on a business project right away. – Hello Everyone Aug 14 '19 at 10:03
  • @VTT Looks like it's c++-cli indeed, there is `gcnew` in the source code. How do I use a library like that? – Todd Sewell Aug 14 '19 at 10:29
  • Perhaps you need to create a C++-cli project first. – user7860670 Aug 14 '19 at 10:42
  • @VTT Everything works now, if you post your observation that it's a C++/CLI library I'll accept that as an answer. – Todd Sewell Aug 14 '19 at 11:55

0 Answers0