LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 05-28-2014, 07:46 PM   #1
edincalif
LQ Newbie
 
Registered: May 2014
Posts: 3

Rep: Reputation: Disabled
problem with semaphore routines - won't compile


​#include <semaphore.h>
#include <stdio.h>

Why am I getting this when I have the correct header file included?

edc@edc-Satellite-L455:~$ gcc sem.c
/tmp/ccsvm3Ok.o: In function `main':
sem.c.text+0xc4): undefined reference to `sem_init'
sem.c.text+0xff): undefined reference to `sem_wait'
sem.c.text+0x12d): undefined reference to `sem_post'
sem.c.text+0x15e): undefined reference to `sem_wait'
sem.c.text+0x18c): undefined reference to `sem_post'


HELP!!

thanks, ed92626@gmail.com

Last edited by edincalif; 05-28-2014 at 07:47 PM. Reason: title is wrong should be won't compile
 
Old 05-28-2014, 10:26 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
>> Problem with SEMAPHORE - does not WAIT << GeorgeOfTheBush Programming 1 06-19-2009 11:35 AM
problem in semaphore and how Asynchronous threads eramax Programming 5 07-16-2008 10:52 AM
problem with semaphore handling ksrinivas Linux - Kernel 0 07-28-2007 11:36 PM
Kernel Compile problem (FC 3, 2.6.11.6 -> 2.6.13.3, semaphore.c) U4ea Linux - Software 1 10-07-2005 03:29 AM
shared memory/semaphore problem V_Ganesh Programming 1 03-31-2005 10:58 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration