Tuesday, August 12, 2008

work related

I'm posting this on my public blog in case it proves useful to someone. I was trying to compile a .so on a RedHat5 Linux system with an atexit call in it using the linker ld directly. When I tried to compile an executable and link the library in I got the following error message:

hidden symbol `atexit' in /usr/lib64/libc_nonshared.a(atexit.oS) is referenced by DSO

I found a few pages out there which suggested creating the .so by using gcc instead of ld which does work but I wanted to use ld. To use ld I had to link in libc_nonshared.a by using the -lc_nonshared flag.

No comments: