Sun Studio 12: C++ User's Guide

Warnings

To ensure proper library linking order, you must use -mt, rather than -lthread, to link with libthread.