In most cases, you can easily link modules compiled with different languages. Do any of the following to ensure that all required libraries link in the correct order:
Put all language libraries in the same directory as the source files.
List directories containing all needed libraries in the LIB environment variable.
Let the linker prompt you for libraries.
In each of the cases above, the linker finds libraries in the order that it requires them. If you enter the library names on the command line, make sure you enter them in an order that allows the linker to resolve your program's external references.
Here are some points to observe when specifying libraries on the command line:
If you are using FORTRAN to write one of your modules, you need to link with the /NOD (no default libraries) option and explicitly specify all the libraries you need on the link command line. You can also specify these libraries with an automatic-response file (or batch file), but you cannot use a default-library search.
If your program uses both FORTRAN and C, specify the library for the most recent of the two language products first. In addition, make sure that you choose a C-compatible library when you install FORTRAN.
If you are listing BASIC libraries on the LINK command line, specify those libraries first.
The following example shows how to link two modules, mod1 and mod2, with a user library, GRAFX, the C run-time library, LLIBCE, and the FORTRAN run-time library, LLIBFORE:
LINK /NOD mod1 mod2,,,GRAFX+LLIBCE+LLIBFORE