Skip to main content


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 UserFriend
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 UserFriend
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: Fri Apr 26 16:24:59 GMT 2024

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

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

Back to the top