Skip to content

Commit c8e1a07

Browse files
author
Colin Robertson
committed
Quick definition of import library
1 parent 631f7b8 commit c8e1a07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Congratulations, you've created a DLL using Visual C++! Next, you'll create a cl
279279

280280
## Create a client app that uses the DLL
281281

282-
When you create a DLL, you must think about how your DLL can be used. To compile code that calls the functions exported by a DLL, the declarations must be included in the client source code. At link time, when these calls to DLL functions are resolved, the DLL import library must be specified for the linker. And at run time, the DLL must be available to the client, in a location that the operating system can find.
282+
When you create a DLL, you must think about how your DLL can be used. To compile code that calls the functions exported by a DLL, the declarations must be included in the client source code. At link time, when these calls to DLL functions are resolved, the linker must have an *import library*, a special kind of library file that contains information for Windows about how to find the functions, instead of the actual code. And at run time, the DLL must be available to the client, in a location that the operating system can find.
283283

284284
To make use of a DLL, whether your own or a third-party DLL, your client app project must be able to find the headers that declare the DLL exports, the import libraries for the linker, and the DLL itself. One way to do this is to copy all of these files into your client project. For third-party DLLs that are unlikely to change while your client is in development, this may be the best way to use them. However, when you also build the DLL, it's better to avoid duplication. If you make a copy of DLL files that are under development, you may accidentally change a header file in one copy but not the other, or use an out of date library. To avoid this problem, we recommend you set the include path in your client project to include the DLL header files from the DLL project. Also, set the library path in your client project to include the DLL import libraries from the DLL project. And finally, copy the built DLL from the DLL project into your build output directory. This ensures that your client app uses the same DLL code you build.
285285

0 commit comments

Comments
 (0)