This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: how to compile a program that uses threads and semaphores?


Hi Lyle,

Thanks, now I can compile this program.

Cheers,

Andre

--- lrtaylor@micron.com wrote:
> For the threads part, at least, you need to link
> your program to the
> pthreads library.  Do this by adding '-pthread' to
> your link command
> line.  Not sure about the semaphores, though...
> 
> Cheers,
> Lyle
> 
> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org
> [mailto:gcc-help-owner@gcc.gnu.org] On
> Behalf Of Andre Kirchner
> Sent: Monday, January 26, 2004 6:33 PM
> To: gcc-help@gcc.gnu.org
> Subject: how to compile a program that uses threads
> and semaphores?
> 
> Hi,
> 
> How do I compile a program that uses threads and
> semaphores? Although I included thread.h and
> semaphore.h in my program, gcc keeps saying that it
> can't find references to sem_wait, sem_post,
> sem_init
> and pthread_create.
> I'm using gcc 3.2.2 on a RedHat 9 box
> 
> Thanks,
> 
> Andre
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool.
> Try it!
> http://webhosting.yahoo.com/ps/sb/


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]