Normally, libraries are created using a library manager such as ar. Given a list of objects, the library manager will insert the objects into a named library to be used in subsequent link steps.
Example |
---|
xiar cru user.a a.o b.o |
The above command creates a library named user.a that contains the a.o and b.o objects.
If the objects have been created using -ipo -c then the archive will not only contain a valid object, but the archive will also contain intermediate representation (IR) for that object file. For example, the following example will produce a.o and b.o that may be archived to produce a library containing both object code and IR for each source file.
Example |
---|
ifort -ipo -c a.f b.f |
In this case, you must use the Intel library driver xild -ar. This program will invoke the compiler on the IR saved in the object file and generate a valid object that can be inserted in a library.
Example |
---|
xild -lib cru user.a a.o b.o |
For more information, see Creating a Multifile IPO Executable.