Reputation: 54521
I want to use a precompiled library in my project. I have 3 folders: Include (.h files), Lib (with .lib files) and Bin (with .dll files and .pdb files). I've never used precompiled libraries before (I hope this is the right term. correct me if I'm wrong). I want to use this API. How to add all this stuff to my project?
I use visual studio 2010 (cpp). Thanks.
Upvotes: 2
Views: 5301
Reputation: 11515
Here's what you do in a nutshell:
Add the folder with the header files to project properties, so they can be included by your source files.
Add this folder to the linker properties, so the linker can match up prototypes with exported functions in the library.
Copy these to your output folder, or make sure the DLL is in PATH, so the running .exe can call the functions.
Upvotes: 2
Reputation: 76541
It's quite easy. You just need to modify some properties:
When you run, make sure the path where the .dll lives is part of PATH.
Upvotes: 7