Build with Existing Object Files and Libraries

You can build new modules that link to existing object modules and libraries. Simply add the .obj or .lib files to the list of sources in your configuration file. Name the target output module in the configuration file. The build process runs the linker to produce a target linked to the specified object files or libraries.

The libraries may be static libraries, or be may import libraries if the target module loads shared libraries at run time.

The VisualAge C++ run-time library is linked by default, and you do not need to mention it in your configuration file, unless you choose not to link with the single-thread static version. Use build options to link to a different version of the run-time library or not to link to the run-time library.

Sources can be object files and libraries that were created in previous builds.

You can also use object files and libraries that were built by earlier versions of VisualAge C++ and predecessor products. There are some migration considerations:

Here is an excerpt from a configuration file that builds a program in file saturn.exe from a C source file, an existing library, and an object file:

/* ... set build options ... */ 
option planet6 {
   target "saturn.exe" {
      source "saturn.cpp", "rings.obj", "planet.lib"
   }
}


Incremental C++ Builds
C Compilation
Configuration Files
Linker Searches


Set Build Options
Add or Change Source Files
Add or Change Targets
Use Executable Modules Created In Previous Releases
Build


Build Options
Build Options for Compatibility with Old C++ Compilers