Fedora Linux Support Community & Resources Center
  #1  
Old 18th February 2007, 07:24 PM
TerjeG Offline
Registered User
 
Join Date: Feb 2006
Posts: 4
Question Pthread issues

I'm using Fedora6_64 and I am attempting to write a C program, based on KDevelop, utilizing threads.
I have "included" pthread.h, but when I attempt to build the program I get "undifined reference to pthread_create".
If anyone can shine some light on my problem, I would appreciate it.

Sincerely

Terje
Reply With Quote
  #2  
Old 18th February 2007, 07:45 PM
mwette Offline
Registered User
 
Join Date: Nov 2005
Location: Los Angeles area
Posts: 887
you need to add "-lpthread" (at least) to the link command
Code:
$ gcc -o myprog myprog.c -lpthread
Reply With Quote
Reply

Tags
issues, pthread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Display the pthread names? zi_au Using Fedora 2 12th March 2008 08:17 AM
pthread aggravation... Pazuzu Using Fedora 0 21st December 2006 05:21 PM
pthread id and process id ckmun81 Using Fedora 0 20th November 2006 02:32 AM
daemon system call & pthread dudelove Programming & Packaging 3 19th March 2006 07:18 PM
static linking pthread lib afeick Programming & Packaging 10 4th November 2005 01:18 PM


Current GMT-time: 06:19 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Newport Instagram Photos - Berezovka Photos on Instagram - Umuahia