Sun Studio 12 Update 1: C++ User's Guide

Warnings

When you compile and link in separate steps, you must use the same -xtarget settings in the compile step and the link step.