Symbol lookup error: undefined symbol atexit (linux/C) -



Symbol lookup error: undefined symbol atexit (linux/C) -

i error symbol lookup error: undefined symbol atexit (linux/c) when seek run program. atexit() should defined in <stdlib.h>.

is there add together -l alternative when compile gcc?

or else do?

this in c.

i trying write shared object phone call atexit once. define corresponding function explained here http://linux.die.net/man/3/atexit

program call: ld_preload=mymal.so /bin/ls error message: /bin/ls: symbol lookup error: ./mymal.so: undefined symbol: atexit

i don't error after compilation, when seek execute it.

i build shared library commands (found in http://www.ibm.com/developerworks/library/l-shobj/):

gcc -fpic -c -ldl mymal.c

ld -shared -soname mymal.so.1 -o mymal.so -lc mymal.o

solved: worked g++ instead of gcc

the function called atexit, not atexit.

c linux

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -