Multithreaded Programming Guide

Compiling and Linking in the Solaris Threads Environment

In a Solaris threads environment, use the following options to compile and link your application:

If you application uses only Solaris threads, use the following command to compile and link:

cc -mt [ flag ... ] file... [ library... ]

The -mt option links in the libthread library.

See the Sun Studio cc(1) man page and Sun Studio 12: C User’s Guide for more information about the cc command options.