Adding -pthread to eclipse, for using posix threads

15/02/2009

Problem

Cannot compile c/c++ project with -pthread. Eclipse is complaining about things.

Solution

Eclipse is not configured to put the -pthread argument in the gcc compilation. To solve this, go to the Menu:

Project -> Properties

From the bar on the left:

c/c++ build -> GCC C Compiler -> Miscellaneous

Add the “-pthread” argument into the beginning of the “Other Flags” Also go to:

c/c++ build -> Settings -> GCC C Linker -> Libraries

And include the “pthread”library into the other libraries. Click Apply and rebuild the project. Pthreads must work now.

There are 176 comments in this article:

  1. 17/11/2014New Orleans vacation rental deals say:

    If you wish for to increase your knowledge only keep visiting this web site and be updated
    with the most recent news posted here.

  2. 6/12/2014Cutting your cable bill down with a Roku say:

    When we let go of the illusion of control and perfectionism, when we focus our thinking on how we can do things differently and take charge of our own self,
    when we look at situations from a growth opportunity
    place, when we look to stretch and grow ourselves up, when we
    focus on the gifts in our lives, then we can be happy and then we
    can create the life and relationship we want.
    Read on to learn how to enhance your video game experience and maximize your
    games’ potential. Perhaps they have a bad hair day or suffering from a bad mood, but it doesn.

  3. 10/12/2014Crown at Robinson Rd say:

    whoah this weblog is great i really like reading your articles.
    Keep up the great work! You know, many individuals are searching round for this info, you could
    help them greatly.

  4. 11/12/2014diamond ace HVAC service say:

    A great place to work san diego diamond ace contractors plumbing means that the pain relief effect lasts even once the TENS machine is taken off.
    There are accomplished electricians obtainable for all types of emergency situations are
    likely to handle some tasks. Hearing them san diego diamond
    ace contractors plumbing talk about it may have given you an incentive to make sure that
    the job possibilities will increase in the future.

  5. 13/12/2014bao co say:

    You need to be a part of a contest for one of the best blogs online.
    I most certainly will recommend this site!

  6. 13/12/2014internet gratis say:

    Nice post. I learn something new and challenging on websites I stumbleupon everyday.
    It’s always exciting to read articles from other
    authors and practice something from other web sites.

  7. 18/12/2014unsecured loans with bad credit say:

    The lender with lower risk in the transaction ccan easily afford to
    give cheap personal loans to the borrowers. However, there are manny
    people who fail to acquire personaal loans because they do not boaxt a good credit
    score or a good credit history. The unsecured option is idezl in circumstances, where in you need a limited amount.

  8. 20/12/2014rao vặt facebook say:

    It’s an remarkable paragraph designed for all the web visitors;
    they will take benefit from it I am sure.

  9. 12/01/2015Dragon Age Inquisition torrent pc say:

    It’s really easy to use and you don’t have to obtain something.
    It can be a zoo, amusement park, or a mixture of equally.

    Ask them questions to show that you are interested.

  10. 13/01/2015Ginger Mcdougall say:

    I have to thank you for the efforts you have put in writing this website.I’m hoping to check out the same high-grade blog posts by you later on as well. In fact, your creative writing abilities has motivated me to get my very own website now ;)my site; are psychics real

  11. 28/01/2015Pc Games say:

    Pc Games

    Adding -pthread to eclipse, for using posix threads – Yak Shaving

  12. 1/02/2015Gale Bodnar say:

    It is truly a nice and useful piece of info.I’m glad that you simply shared this useful info with us.Please keep us informed like this. Thank you for sharing.Feel free to visit my web page … phen375 gnc

  13. 3/02/2015Valorie Proffitt say:

    hello!,I love your writing so so much! share we be in contact extra approximately your article on AOL?I require a specialist on this area to unravel my problem. May be that is you!Taking a look forward to look you.my weblog – phen375 review (Francisco)

  14. 13/02/2015Pearlene Gerrity say:

    For that longest time, I have got engaged in intense work outs forcing myself personally towards the boundaries to achieve my preferred body weight.That’s some tips i do in order to stay healthy.I additionally eat a lot to make up the vitality I missing, but my excess weight problem was nonetheless a problem due to the fact anytime I’m carried out training.Doesn’t seem sensible. I desired some thing to assist me stop eating a great deal although i also don’t like the thought of famished myself. And PhenElite weightloss pills just did the trick. It suppressed my appetite for food not having this feeling of famished personally.Before lunch or dinner, i started with the product 3 weeks back consuming 2 drugs 30 minutes. I usually have good meal meals. But what designed the main difference was immediately after my exercise routine, I not anymore binged for food. I could very last the night with 2 crackers and a window of dairy.No longer late night substantial foods. And soon after 21 time with that plan, I dropped 17 lbs so i fallen from the 32 pant dimensions to 29. I’ve never ever noticed leaner like this ahead of, this all in 3 days, couldn’t request for far more!Check out my webpage … Phentermine 37.5 Diet Appetite Suppressant (http://Www.Macoed.Ru/)

  15. 17/02/2015louis vuitton ipad say:

    louis vuitton ipad

    Adding -pthread to eclipse, for using posix threads – Yak Shaving

  16. 17/02/2015name brand purses say:

    name brand purses

    Adding -pthread to eclipse, for using posix threads – Yak Shaving

  17. 16/03/2015english only please full movie say:

    english only please full movie

    blog topic

  18. 8/04/2015Analisa Matson say:

    Link exchange is nothing else however it is only placing the other person’s blog link on your page at suitable place and other person will also do similar in support of you.Here is my web page :: パソコン修理

  19. 9/10/2015new adidas originals say:

    After the end of the training, a reporter asked Pietrus comeback time, Pietrus very humor to ask reporters have the watch, then paused and added: may be 48 hours.
    new adidas originals http://www.iskaashi.net/uk53/

  20. 13/02/2016Delia Merrill say:

    Additionally, most trackers let you enter the foods you’ve got eaten throughout thee dayy to maintain observe of energy and diet.Here iss myy webppage – wordpress post

  21. 19/03/2016Buck Mahlum say:

    Fat Diminisher System Reviews, in today’s competitive world, there is not a single individual out there who is not dealing with the unhealthy consequences of obesity.

  22. 26/03/2016Máximo Décimo Meridio say:

    Like a charm.

  23. 8/05/2016Gonzalo say:

    I’d like to find out more? I’d like to find out more details.Here is my page: cool helmets

  24. 11/06/2016Roxanne Kosovich say:

    Hi therе, i read your blog from tіme to time and і oᴡn a ѕimilar οne and і was just curious if yⲟu get a lⲟt of spam responses?ӏf so how do yoս reduce іt, аny plugin oг anything yⲟu can recommend?І get so much latelky it’ѕ driving me crazy sso any asszistance іs ver much appreciated.Ⅿy homepage … targeted opt in email lists

  25. 14/07/2016forex brokers in dubai say:

    forex brokers in dubai

    Adding -pthread to eclipse, for using posix threads – Yak Shaving

  26. 4/08/2016Krissy Crowne say:

    Excellent commentary . Coincidentally , others are interested in a Rp 425 form , my colleagues filled out and esigned a sample form here http://goo.gl/fiJvPR

Write a comment: