Thank you for your comments. I think if "--no-undefined" error does not exist, when building the shared library, the external dependencies should not be solved (means, linker will not find exported symbol is actually implemented), right? When we add the option, when building a shared library, linker will find all imported external symbols are implemented (i.e. defined) by other modules. Am I correct? regards, George ----- Original Message ---- From: Ian Lance Taylor <iant@xxxxxxxxxx> To: Lin George <george4academic@xxxxxxxxx> Cc: gcc-help@xxxxxxxxxxx Sent: Thursday, December 14, 2006 12:01:03 AM Subject: Re: -no-undefined option Lin George <george4academic@xxxxxxxxx> 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@xxxxxxxxxxxxxxx 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 ____________________________________________________________________________________ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.