public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* creating shared object
@ 2000-11-10  9:17 Eerden, Jense van der
  2000-11-10 10:59 ` Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Eerden, Jense van der @ 2000-11-10  9:17 UTC (permalink / raw)
  To: help-gcc

L.S.

I'm having a small problem and I wonder if this address is the correct entry
point for questions. If not: please let me know.

My problem is to create a shared object on a UNIX system. When I use your
compiler/linker to create a shared object and I want to link some additional
libraries with it using the -L and -l options, I still get error messages
for unresolved symbols, althoug I'm sure all necessary libraries are
included.

Can you please give us some examples for creation of shared objects, that
have to include several  libraries (.a) ?

Please respond..., thanks in advance

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: creating shared object
  2000-11-10  9:17 creating shared object Eerden, Jense van der
@ 2000-11-10 10:59 ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2000-11-10 10:59 UTC (permalink / raw)
  To: Eerden, Jense van der; +Cc: help-gcc

On Nov 10, 2000, "Eerden, Jense van der" <Eerden@hitt.nl> wrote:

> My problem is to create a shared object on a UNIX system. When I use your
> compiler/linker to create a shared object and I want to link some additional
> libraries with it using the -L and -l options, I still get error messages
> for unresolved symbols, althoug I'm sure all necessary libraries are
> included.

This is a linker issue, not a compiler issue, so a question to the
binutils mailing list would probably have been more appropriate.

Anyway, this is kind of a linker FAQ.  The order of object files and
libraries *is* relevant, and the linker does a single pass looking for
undefined symbols.  So, if a static library is listed *before* object
files or other libraries that use symbols from it, they won't be
pulled into the executable or shared library that you're creating.  If
static libraries have cross-dependencies, you may have to list them
more than once.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-10 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-10  9:17 creating shared object Eerden, Jense van der
2000-11-10 10:59 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).