0

I'm using Visual studio 2015

I'm trying to add some libraries(.lib) to my project. I add them by going to Project->Properties and go to the tab Linker. I go to General and fill in the Additional Library Directories. After that I go to Inputand fill in the files I want to include at Additional Dependencies. (These files are located in the Additional Library Directories).

But when I run my program it says: The program can't start because filename.dll is missing from your computer. Try reinstalling the program to fix this problem.

I know these .lib files work with the dll file. But when I add the .dll file also to the additional dependencies it says: invalid or corrupt file: cannot read 0x2C8.

Thats because my dll file shouldn't be there, so how can I include this dll file or let it work with my .lib files to run my program?

Bart
  • 717
  • 1
  • 9
  • 28
  • You should enter the static libraries (.lib) to the Additional Libraries. However, the DLL must be in one of the looked up locations (working directory, a directory listed in the PATH env variable, the system folder, etc.). – Marius Bancila Sep 23 '15 at 09:18
  • When I add the .dll files to the same directory as where my project is, it still gives the same error. I saw when I add the .dll files in my C://Windows it DOES work. But I don't want them to be in my Windows folder. – Bart Sep 23 '15 at 09:21
  • Not where your project, but where you're project output is. The working directory, the directory from where your executable is runnning. – Marius Bancila Sep 23 '15 at 09:22
  • and How can I add these .dll files in my project directory so my computers loads them from here instead of my working directory? – Bart Sep 23 '15 at 09:23

0 Answers0