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
Use the -l switch. Example:
g++ -g myfile.cpp -o myfile -lpthread
And including switch -Wall, which enables all warnings, will save you a few headache.