public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ipc
@ 2005-07-07 11:31 raja
  2005-07-07 12:13 ` ipc Paolo Ornati
  0 siblings, 1 reply; 4+ messages in thread
From: raja @ 2005-07-07 11:31 UTC (permalink / raw)
  To: linux-kernel

Hi,
While working with posix ipc i used the function mq_open.
When i compiled using gcc i am getting error as
 
: undefined reference to `mq_open'
collect2: ld returned 1 exit status
 
will you please tell me how to avoid that.
 
Thanking you,
raja

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipc
  2005-07-07 11:31 ipc raja
@ 2005-07-07 12:13 ` Paolo Ornati
  2005-07-07 12:27   ` ipc Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Ornati @ 2005-07-07 12:13 UTC (permalink / raw)
  To: raja; +Cc: linux-kernel

On Thu, 07 Jul 2005 17:01:51 +0530
raja <vnagaraju@effigent.net> wrote:

> Hi,
> While working with posix ipc i used the function mq_open.
> When i compiled using gcc i am getting error as
>  
> : undefined reference to `mq_open'
> collect2: ld returned 1 exit status
>  
> will you please tell me how to avoid that.

Also this has nothing to do with kernel, stop posting here these
questions.

----

You need to tell GCC to use "libmqueue"... something like this:

	gcc -Wall -O2 -o prog prog.c -lmqueue


Please read this book for other generic programming questions:
	http://www.advancedlinuxprogramming.com/

And use Google.

-- 
	Paolo Ornati
	Linux 2.6.12.2 on x86_64

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipc
  2005-07-07 12:13 ` ipc Paolo Ornati
@ 2005-07-07 12:27   ` Jakub Jelinek
  2005-07-07 12:46     ` ipc Paolo Ornati
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2005-07-07 12:27 UTC (permalink / raw)
  To: Paolo Ornati; +Cc: raja, linux-kernel

On Thu, Jul 07, 2005 at 02:13:02PM +0200, Paolo Ornati wrote:
> You need to tell GCC to use "libmqueue"... something like this:
> 
> 	gcc -Wall -O2 -o prog prog.c -lmqueue

If you have glibc 2.3.4 or later, you should use -lrt instead.

	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipc
  2005-07-07 12:27   ` ipc Jakub Jelinek
@ 2005-07-07 12:46     ` Paolo Ornati
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Ornati @ 2005-07-07 12:46 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: raja, linux-kernel

On Thu, 7 Jul 2005 08:27:48 -0400
Jakub Jelinek <jakub@redhat.com> wrote:

> If you have glibc 2.3.4 or later, you should use -lrt instead.

Yes... I was just saying that he forgot to add "-lLIBRAY_NAME" :)

-- 
	Paolo Ornati
	Linux 2.6.12.2 on x86_64

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-07 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-07 11:31 ipc raja
2005-07-07 12:13 ` ipc Paolo Ornati
2005-07-07 12:27   ` ipc Jakub Jelinek
2005-07-07 12:46     ` ipc Paolo Ornati

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox