* pthread_once
@ 2010-09-22 13:31 ratheesh k
2010-09-22 20:28 ` pthread_once Glynn Clements
0 siblings, 1 reply; 4+ messages in thread
From: ratheesh k @ 2010-09-22 13:31 UTC (permalink / raw)
To: linux-c-programming, linux-rt-users
I have an embedded box running 2.6.18 linux with rt patch.
I am developing an userspace application which need timer_create() .
I have a big desktop machine with a 4 GB ram, running only linux
2.6.18 ( not rt linux ) . I would like to compile and test it on this
Desktop PC .
I compiled my program and linked with librt.a on my Desktop PC. But
when i run my program , it says
undefined symbol: pthread_once
what could be the problem, ???
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pthread_once
2010-09-22 13:31 pthread_once ratheesh k
@ 2010-09-22 20:28 ` Glynn Clements
0 siblings, 0 replies; 4+ messages in thread
From: Glynn Clements @ 2010-09-22 20:28 UTC (permalink / raw)
To: ratheesh k; +Cc: linux-c-programming, linux-rt-users
ratheesh k wrote:
> I have an embedded box running 2.6.18 linux with rt patch.
>
> I am developing an userspace application which need timer_create() .
> I have a big desktop machine with a 4 GB ram, running only linux
> 2.6.18 ( not rt linux ) . I would like to compile and test it on this
> Desktop PC .
>
> I compiled my program and linked with librt.a on my Desktop PC. But
> when i run my program , it says
>
> undefined symbol: pthread_once
>
> what could be the problem, ???
pthread_once is defined in libpthread, which you should be linking
against if you're using librt.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pthread_once
@ 2010-09-24 15:36 Ardhan Madras
2010-09-24 17:59 ` pthread_once Glynn Clements
0 siblings, 1 reply; 4+ messages in thread
From: Ardhan Madras @ 2010-09-24 15:36 UTC (permalink / raw)
To: Glynn Clements; +Cc: ratheesh.ksz, linux-c-programming, linux-rt-users
--- glynn@gclements.plus.com wrote:
> pthread_once is defined in libpthread, which you should be linking
> against if you're using librt.
Sory but did you mean we also need linking to libpthread when using librt?
_____________________________________________________________
Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pthread_once
2010-09-24 15:36 pthread_once Ardhan Madras
@ 2010-09-24 17:59 ` Glynn Clements
0 siblings, 0 replies; 4+ messages in thread
From: Glynn Clements @ 2010-09-24 17:59 UTC (permalink / raw)
To: ajhwb; +Cc: ratheesh.ksz, linux-c-programming
Ardhan Madras wrote:
> > pthread_once is defined in libpthread, which you should be linking
> > against if you're using librt.
>
> Sory but did you mean we also need linking to libpthread when using librt?
Yes; librt requires libpthread. If you use shared libraries, it should
get linked automatically, but that doesn't work with static libraries.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-24 17:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-24 15:36 pthread_once Ardhan Madras
2010-09-24 17:59 ` pthread_once Glynn Clements
-- strict thread matches above, loose matches on Subject: below --
2010-09-22 13:31 pthread_once ratheesh k
2010-09-22 20:28 ` pthread_once Glynn Clements
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).