次の方法で共有


Link Implicitly

OverviewHow Do IFAQDetailsSample

To implicitly link to a DLL, executables must obtain the following from the provider of the DLL:

  • A header file (.H file) containing the declarations of the exported functions and/or C++ classes.

  • An import library (.LIB files) to link with. (The linker creates the import library when the DLL is built.)

  • The actual DLL (.DLL file).

Executables using the DLL must include the header file containing the exported functions (or C++ classes) in each source file that contains calls to the exported functions. From a coding perspective, the function calls to the exported functions are just like any other function call.

To build the calling executable file, you must link with the import library. If you are using an external makefile, specify the file name of the import library where you list other object (.OBJ) files or libraries that you are linking with. If you are working in the Visual C++ development environment, specify the file name of the import library in the Object/Library Modules text box on the Link tab of the Project Settings dialog box.

The operating system must be able to locate the .DLL file when it loads the calling executable.

What do you want to do?

What do you want to know more about?