If your linker is complaining when you are pthread-ing on your Linux, then you are probably looking for the solution below
Method 1
From "Setting" menu choose "Compiler and debugger.." click on "linker Settings" tab, under "Other linker option" write 'pthread', click OK and compile.
Method 2
If the first method didn't work for you,repeat the same steps and remove what did you write under "Other linker option". now under "link libraries" scroll down and click "add" then add the path to libpthread. to know its location. execute in terminal
$ locate libpthread
then click OK.
the linker is happy now, so compile your code.
No comments:
Post a Comment