Author Topic: Easier way to link to pthread? - Xubuntu  (Read 8471 times)

Offline Disch

  • Single posting newcomer
  • *
  • Posts: 3
Easier way to link to pthread? - Xubuntu
« on: April 23, 2009, 09:16:31 pm »
I'm still somewhat of a Linux noob, and I'm trying to get pthread working in a project I'm working on.  When trying to link to the library, the first thing I tried was to add it the way I've added other libs in the past:

-) right-click on workspace, properties
-) go to Libraries tab, add the 'pthread' library to the project

However I was put off by the fact that 'pthread' was not on the list of known libraries.  After searching the forums I came across this thread:

http://forums.codeblocks.org/index.php/topic,8410.0.html

This solution works great, and everything is working in my program now.

However, my question is, is there any way to get C::B to recognize pthread as a known library so that it's added to that list of libraries?  It's so much easier selecting the libs I want from a known list than having to remember the exact name of each lib I need to link to.  Do I have to modify some kind of data file somewhere?  Do I need to reinstall a specific package?

I'm using C::B 8.02, Xubuntu 8.10.  Any help greatly appreciated!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Easier way to link to pthread? - Xubuntu
« Reply #1 on: April 24, 2009, 08:49:16 am »
is there any way to get C::B to recognize pthread as a known library so that it's added to that list of libraries?
You can try the lib_finder plugin which was developed for this purpose.
An alternative is to create yourself a wizard that set's up a project just as you like.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ