Linking a DLL in Visual Studio

2019-02-18 02:22发布

问题:

I'm using Visual Studio C++ 2005 on Windows XP.

I have created a DLL shared library using Visual Studio C++ 2005.

However, I am not sure how to link it. Normally I have just created the static libraries (*.lib).

Do I link the same way I would when linking a library. By using the properties C/C++ and linker general properties and selecting the path for the headers and library paths?

Many thanks for any advice.

回答1:

When you create the DLL there should be a .lib file created for the purpose of dynamic linking. You can use these just as you would static .lib files.



回答2:

This article explains Windows dlls well.

The .LIB file associated with a DLL describes what (exported) symbols are present in the DLL, together with their locations.