This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -no-undefined option
Lin George <george4academic@yahoo.com> writes:
> Could anyone explain in what scenario this option is needed (what is
> its special function)?
That is not a compiler option, so gcc-help is not the right mailing
list. It is a GNU linker option. The right list for questions about
the linker is binutils@sourceware.org. See
http://sourceware.org/binutils/
The -no-undefined option is documented in the linker manual. When
creating a shared library, the default for an undefined symbol is to
not report an error. The --no-undefined option changes this to report
an error.
This is useful if you want to ensure that the shared library is
complete in itself, and does not have any references to other shared
libraries.
Ian