[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shared library linking on Darwin
From: |
Chris Leishman |
Subject: |
Re: shared library linking on Darwin |
Date: |
Fri, 20 Apr 2001 13:50:04 +1000 |
On Friday, April 20, 2001, at 08:05 AM, Kevin Ryde wrote:
Chris Leishman <address@hidden> writes:
Everything compiles ok, but the dlopen fails with the error "not a
Mach-O MH_BUNDLE file type" (this error message is output by dlcompat
when NSCreateObjectFileImageFromFile returns
NSObjectFileImageInapproriateFile).
Perhaps the backtick quoting problem (other thread) is making it miss
out on -bundle, instead using -dynamiclib, due to the test in
archive_cmds being evaluated too early. You might want to check the
cc command that gets run.
No cc commands get run to link (output below). Libtool has decided that
it couldn't satisfy all inter-library dependencies for the module (even
though the only dependency is a single libtool convenience library), and
is hence building a static archive using ar and ranlib.
The .a archive is obviously not a bundle library, hence it spits the
error.
Chris
/bin/sh ./libtool --mode=link cc -W -Wall -O0 -g -o module.la -rpath
/usr/local/lib -module -release 0-1 module.lo extra/libextra.la
rm -fr .libs/module.la .libs/module.* .libs/module-0-1.*
*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module module. Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
rm -fr .libs/module.lax
mkdir .libs/module.lax
rm -fr .libs/module.lax/libextra.al
mkdir .libs/module.lax/libextra.al
(cd .libs/module.lax/libextra.al && ar x
/Users/caleishm/work/test_mod/extra/.libs/libextra.al)
~/work/test_mod/.libs/module.lax/libextra.al
ar cru .libs/module.a module.o .libs/module.lax/libextra.al/extra.lo
ranlib .libs/module.a
rm -fr .libs/module.lax
creating module.la
(cd .libs && rm -f module.la && ln -s ../module.la module.la)
~/work/test_mod/.libs
- shared library linking on Darwin, Chris Leishman, 2001/04/16
- Re: shared library linking on Darwin, Alexandre Oliva, 2001/04/16
- Re: shared library linking on Darwin, Chris Leishman, 2001/04/17
- Re: shared library linking on Darwin, Kevin Ryde, 2001/04/19
- Re: shared library linking on Darwin,
Chris Leishman <=
- Re: shared library linking on Darwin, Gary V . Vaughan, 2001/04/20
- Re: shared library linking on Darwin, Kevin Ryde, 2001/04/21
- Re: shared library linking on Darwin, Gary V . Vaughan, 2001/04/23
- Re: shared library linking on Darwin, Kevin Ryde, 2001/04/25