Re: undefined references in libc_nonshared.a when linking .so

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



chris cross <xcross_ibm@xxxxxxxxx> writes:

> Trying to link a shared object on FC3 and get some
> confusing undefined references in libc_nonshared.a. I
> isolated it to when I pass -shared as a linker option,
> as in "gcc -Wl,-shared". When I use the gcc option,
> "gcc -shared" I don't get the problem. 

You should use gcc -shared.  You should not use gcc -Wl,-shared.

gcc -shared passes the right files and options to the linker to create
a shared library, including -shared.  Using -Wl,-shared just passes
-shared to the linker, without the required additional files.

There is no bug here.  Passing commands directly to the linker
requires that you know what you are doing.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux