C++ User's Guide

Warnings

To ensure proper library linking order, use this option, rather than -lthread, to link with libthread.

If you compile and link in separate steps and you compile with -mt, be sure to link with -mt, as shown in the following example, or you might get unexpected results.


demo% CC -c -mt myprog.cc
demo% CC -mt myprog.o