r

Applies to C Applies to C++

Purpose

Produces a relocatable object. This permits the output file to be produced even though it contains unresolved symbols.

Syntax


Syntax Diagram

Notes

A file produced with this flag is expected to be used as a file parameter in another call to xlc++.

Example

To compile myprogram.c and myprog2.c into a single object file mytest.o, enter:

xlc myprogram.c myprog2.c -r -o mytest.o

Related References

Compiler Command Line Options IBM Copyright 2003