Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Compiling with -lpthread
Compiling with -lpthread [message #215668] Wed, 07 May 2008 19:35 Go to next message
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 Go to previous message
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
>
Previous Topic:Automactic GUI testing for CDT
Next Topic:Shared Build Configurations
Goto Forum:
  


Current Time: Thu Oct 02 00:38:07 GMT 2014

Powered by FUDForum. Page generated in 0.01868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software