分步进行编译和链接
要生成稍后可以链接的对象文件,使用 -c 选项。
xlf95 -c file1.f # Produce one object file (file1.o)
xlf95 -c file2.f file3.f # Or multiple object files (file1.o, file3.o)
xlf95 file1.o file2.o file3.o # Link object files with appropriate libraries通常最好通过编译器调用命令来执行链接程序,因为它会自动将一些额外的 ld 选项和库名传递给链接程序。