[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #NVK-272087]: NetCDF linking issues on Mac OSX 10.5.2
- Subject: [netCDF #NVK-272087]: NetCDF linking issues on Mac OSX 10.5.2
- Date: Tue, 29 Apr 2008 10:12:16 -0600
Hi,
After you built netCDF 3.6.2 from source, did you also install it by
invoking "make install"?
The default location for installing netCDF is not /usr/local/ACCESS/,
so if you built and installed it, presumably you must have explicitly
specified --prefix=/usr/local/ACCESS as an argument to the configure
script, or the library in /usr/local/ACCESS/lib/ is not the one you
built.
By using "ls -l /usr/local/ACCESS/lib/libnetcdf.a" you could find out
when that library file was installed, and if it turns out to be before
you built the library, that might indicate what the problem is. By
invoking "file /usr/local/ACCESS/lib/libnetcdf.a" you would see what
kind of file MAC OS X thinks it is. If it's built for the
architecture you are using, it should just report "current ar
archive".
> Should I be using a different link symbol (besides -lnetcdf -lnsl)
> to link to the libnetcdf.a library?
Typically you also need to tell the compiler where to look using "-L",
for example
... -L/usr/local/ACCESS/lib -lnetcdf
and as far as I know "-lnsl" is not necessary for linking netCDF
libraries on Mac OS X, but it shouldn't cause a problem to specify an
unneeded library.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: NVK-272087
Department: Support netCDF
Priority: Normal
Status: Closed