Build Modules That Use DLLs

You can create one executable program that uses one or more DLLs with the same build that creates the DLLs. In your configuration file, use a different target directive for each DLL file and for the executable file. Alternatively, you can perform separate builds for every DLL and for each executable file that uses the DLLs.

When you build a DLL, VisualAge C++ automatically produces an import library with the same file name as the DLL and with file extension .lib. The import library contains information that the linker needs to satisfy references from other modules to the DLL.

If you build a module with one configuration file and your module uses a DLL that was built with a different configuration file, supply the import library as a source file. If you do not have an import library, you can list the imported symbols with the link(import,...) option.

On OS/2 and Windows NT platforms, you can create an import library with the ilib command.

If you create the DLLs and an executable file with the same configuration file, you do not have to specify the import libraries as sources for the executable target. Here is an example:

target "zoo.dll" { 
   // ... option directives omitted ... 
   source "zoo.c"
}
target "wildlife.exe" {
   // ... option directives omitted ...
   source "wildlife.c" // source zoo.lib not specified
}

.



Static and Dynamic Link Libraries
Configuration Files


Add or Change Source Files
Add or Change Targets
Build
Build Dynamic Link Libraries
Create an Import Library and Export Object
Repackage VisualAge C++ DLLs for Distribution