ubuntu : __errno_location undefined

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • czp.opensource@gmail.com

    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_locatio n function is not defined: undefined
    reference to `__errno_locati on()'
    but the function is exectly defined in libpthread.a.
    nm /usr/lib/libpthread.a | grep errno
    U __errno_locatio n
    errno.o:
    00000051 T __errno_locatio n
    00000000 T __h_errno_locat ion
    U __errno_locatio n
    U __errno_locatio n

    why? help please!

    Allen
  • Ian Collins

    #2
    Re: ubuntu : __errno_locatio n undefined

    czp.opensource@ gmail.com wrote:
    >
    why? help please!
    >
    Try a Linux group, they'll know.

    --
    Ian Collins.

    Comment

    • Chris Gordon-Smith

      #3
      Re: ubuntu : __errno_locatio n undefined

      czp.opensource@ 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_locatio n function is not defined: undefined
      reference to `__errno_locati on()'
      but the function is exectly defined in libpthread.a.
      nm /usr/lib/libpthread.a | grep errno
      U __errno_locatio n
      errno.o:
      00000051 T __errno_locatio n
      00000000 T __h_errno_locat ion
      U __errno_locatio n
      U __errno_locatio n
      >
      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
      Origin Of Life, Chris Gordon-Smith, Oparin, Haldane, Primordial Soup, Artificial Chemistry, Flexica, Cellular Automata

      Comment

      Working...