468,512 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

ubuntu : __errno_location undefined

hi all:
my code is work well on fedora 7 or fedora 8. now i installed
ubuntu, my code can't compile crrectly.
error is __errno_location function is not defined: undefined
reference to `__errno_location()'
but the function is exectly defined in libpthread.a.
nm /usr/lib/libpthread.a | grep errno
U __errno_location
errno.o:
00000051 T __errno_location
00000000 T __h_errno_location
U __errno_location
U __errno_location

why? help please!

Allen
Feb 9 '08 #1
2 5337
cz************@gmail.com wrote:
>
why? help please!
Try a Linux group, they'll know.

--
Ian Collins.
Feb 9 '08 #2
cz************@gmail.com wrote:
hi all:
my code is work well on fedora 7 or fedora 8. now i installed
ubuntu, my code can't compile crrectly.
error is __errno_location function is not defined: undefined
reference to `__errno_location()'
but the function is exectly defined in libpthread.a.
nm /usr/lib/libpthread.a | grep errno
U __errno_location
errno.o:
00000051 T __errno_location
00000000 T __h_errno_location
U __errno_location
U __errno_location

why? help please!

Allen
Sounds like a linking problem. Is it something to do with the way you have
specified libraries to be used. Often if you specify library A first and B
later in the list, then if something in B calls something in A, the linker
will not find it. One way to handle this is to repeat the list of
libraries, so that A now appears after B, as well as before it.

Chris Gordon-Smith
www.simsoup.info
Feb 9 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Google Mike | last post: by
8 posts views Thread by Martin Maney | last post: by
reply views Thread by furious_radish | last post: by
1 post views Thread by Michael | last post: by
2 posts views Thread by soren.andersen | last post: by
2 posts views Thread by Pradnyesh Sawant | last post: by
1 post views Thread by Harry George | last post: by
11 posts views Thread by Ix | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.