Hi I have an old inherited file with c code (visual studio 6). I compiled this file in Visual C++ 2010 (I made an empty project and a win32 console application) and was OK. But when I did the build to make the .exe then the linker throws errors. I found that was missing a dll. But how can I link the dll in visual C++ 2010; I have a .dll and the corresponding .lib file from manufacturer. How do I go from here?

Thanks

Where did you put the DLL? Is it in the path of the program?
What DLL did it say you were missing and what was the actual error given by the linker?

You will need to add the lib in your linker dependencies. To do so, follow these steps:

  1. Right-click on the project, then choose Properties
  2. Under "Linker", choose "Input"
  3. Add the lib name (e.g. mylib.lib) to the "Additional Dependencies" list
  4. Ensure that the path to your lib is added to the "Additional Library Directiories" under "Linker", then "General"

Before you start your program, ensure that the DLL is in the same directory as your program.