Sun Studio 12: C++ User's Guide

3.2 General Guidelines

Some general guidelines for the C++ compiler options are:

Source files, object files, and libraries are compiled and linked in the order in which they appear on the command line.