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

Warnings

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