Compiling with -lpthread [message #215668] |
Wed, 07 May 2008 19:35 |
Eclipse User |
|
|
|
Originally posted by: gmuller.mastersolve.com.br
Hi...
I know it sounds stupid, but I can't compile with -lpthread using
eclipse... I know the syntax should be g++ -o out in.cpp -lpthread, but I
couldn't find where I can set this.
Eclipse is autogenerating make files, so, no way I can edit it...
Can anyone help me? I need to set this flag to use pthread.h...
Thanks in advance,
Guilherme Müller
|
|
|
Re: Compiling with -lpthread [message #215676 is a reply to message #215668] |
Wed, 07 May 2008 20:15 |
Eclipse User |
|
|
|
Originally posted by: newsgroups.snipah.com
Hi Guilherme,
You can add static libraries:
project->properties->C/C++ Build->Settings->C Linker->Libraries
Simply add "pthread" as Library and it should work. You can verify the
list of options in C linker->All Options. There should now -lpthread appear.
You can also add additional options under "Miscellaneous" directly.
Ciao
Enrico
Guilherme Müller wrote:
> Hi...
>
> I know it sounds stupid, but I can't compile with -lpthread using
> eclipse... I know the syntax should be g++ -o out in.cpp -lpthread, but
> I couldn't find where I can set this.
>
> Eclipse is autogenerating make files, so, no way I can edit it...
>
> Can anyone help me? I need to set this flag to use pthread.h...
>
> Thanks in advance,
>
> Guilherme Müller
>
|
|
|
Powered by
FUDForum. Page generated in 0.03064 seconds