Friday, March 27, 2009

Compiling a multithreaded program

Hi all,

If sample.c is our program consisting of code leveraging POSIX threads for multithreading on a Linux platform then the following command is used to compile the program.

gcc -o sample sample.c -lpthread

Cheers!!!!!!

No comments: