Steffan Harris
Steffan Harris

Reputation: 9326

How do I add a dll to a VC++ 2008 project

I would like to add a dll in my C++ project, but I do not know how I would go about doing this. I am using Visual C++ 2008 Express Edition.

Upvotes: 0

Views: 113

Answers (1)

fefe
fefe

Reputation: 3432

You don't add an dll to a project. You'll need a corresponding .lib file, which would probably provide the entry points of each exported function in the dll, and a corresponding header (.h).

To use the functions in the dll, to just #include the .h in your source, the link to the .lib file.

If you don't have the .lib file, then you'll have to use LoadLibrary to load the dll dynamically and GetProcAddress to get the function pointer to be called. (But again, the dll does not need to be put into the project).

Upvotes: 2

Related Questions