I'm trying to link my project (C++ console application) to an external static library (basically a .lib
file and a .h
header file), in Visual Studio 2015.
I've added the path of the folder which contains the .lib
(a specific folder I've created, under the project's root folder, which contains the .lib file only), under the project properties, to
- "C/C++ - General - Additional Include Directories"
- "Linker - General - Additional Library Directories"
And I've also added the file name to "Linker - Input - Additional Dependencies".
As a test, I've tried to specify the wrong file name - this caused an LNK1104
error (which doesn't occur when the correct name is specified).
For some reason, once I #include
the library header (.h
file) into my main.cpp
file, a "system error" accures -
The program can't start because external_dll.dll is missing from your computer [..]
For some reason, the Linker looks for a .dll
file, based on the name of the #include
d header - despite the fact that I've linked the project with the static library (.lib
file).
This .dll
file, of course, doesn't exist.
Am I missing something here?