libtool
[Top][All Lists]
Advanced

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

Re: question about shared builds with Sun native compilers...


From: Ralf Wildenhues
Subject: Re: question about shared builds with Sun native compilers...
Date: Tue, 22 Apr 2008 19:05:41 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hi Ed,

* Ed Hartnett wrote on Tue, Apr 22, 2008 at 01:24:45PM CEST:
> I am using it to distribute a freeware scientific data library,
> netcdf. The netcdf distribution actually builds more than one
> library. It builds a core C library, and a fortran library. The
> fortran library calls the C library.
> 
> The way I handle this is to first build the fortran library, then the
> C library.

But that won't work portably (as you've now noticed).  You need to tell
libtool that libnetcdff depends on libnetcdf, and the latter needs to be
built first, as Dan already noted.

Do it like this:
  libnetcdff_la_LIBADD = ../subdir/libnetcdf.la

with a relative path to the C library.  If they are in different
directories, you need to adjust SUBDIRS ordering in the right
Makefile.am file so that the C library is built first.  If in the same
directory, you need to list libnetcdf.la first in lib_LTLIBRARIES.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]