Jul 14, 2010 at 6:24am
Hi all
i am using linux for writing c++ code first time.
i am using following command to compile my code
g++ -g myfile.cpp -o myfile
i want to add a additional lib file in above command .
(in visual studio we can do it through project properties tab)
how can i do it here ?
thanks in advance
Jul 14, 2010 at 8:19am
Use the -l switch. Example:
g++ -g myfile.cpp -o myfile -lpthread
Jul 14, 2010 at 10:05am
And including switch -Wall, which enables all warnings, will save you a few headache.