LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   "atexit" only defined in root (https://www.linuxquestions.org/questions/linux-software-2/atexit-only-defined-in-root-141977/)

sraphim 02-03-2004 06:16 PM

"atexit" only defined in root
 
When compliing programs, I get a common error, where the linker fails to resolve "atexit" in any program that uses it:

/tmp/ccityKp3.o(.text+0x1d): In function `main':
: undefined reference to `atexit'

However, every binary that references atexit CAN use it without problem, and if I compile the program as root, it will be able to link successfully.

This is particularly interesting, considering that libc_nonshared.a is in the right place, and /usr/lib/libc.so groups the nonshared static lib with the libc.so in /lib/. Furthermore, regular users and root use the same ld.

Does anyone happen to know why it does not work for regular users? Any help would be greatly appreciated.

Thanks in advance!


All times are GMT -5. The time now is 07:12 PM.