[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #FWY-763930]: ld: cannot find -lnetcdf_c++
- Subject: [netCDF #FWY-763930]: ld: cannot find -lnetcdf_c++
- Date: Tue, 01 Nov 2011 09:24:13 -0600
Ah, you will need to add the netCDF tools to your path:
export PATH=/apps/netcdf-4.0.1/bin:$PATH
Once you've added netCDF to the path, give nc-config another try.
Cheers,
Sean
> Sean,
>
> Thanks. The version of netcdf in our lab is: 4.0.1
>
> I run this (./nc-config ), it showed: -bash: ./nc-config: No such file or
> directory)
>
>
>
>
>
> Tong Wei
> GOES-R
> 240 206 7095
>
>
> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: Tuesday, November 01, 2011 8:11 AM
> To: Wei, Tong
> Cc: address@hidden
> Subject: [netCDF #FWY-763930]: ld: cannot find -lnetcdf_c++
>
> Greetings Tong,
>
> > Hi , how are you?
> >
>
> We are doing well here in Boulder - getting ready for the next round of snow!
> Woohoo!
>
> > My name is Tong Wei from Harris Corp.
> >
> > We are using netcdf-4.0.1 in our codes. when I was trying to compile this
> > code, I got this error:
> >
> > ld: cannot find -lnetcdf_c++
> > make: *** [lib/libLightningAlgorithm.so] Error 1
> >
> > Here is its make file:
> >
> > NETCDF_LOCATION := /apps/netcdf-4.0.1
> > $(CSU)_CPPFLAGS += -I$(NETCDF_LOCATION)/include
> > $(CSU)_LDFLAGS += -L$(NETCDF_LOCATION)/lib
> > -Wl,-rpath=$(NETCDF_LOCATION)/lib
> > $(CSU)_LDLIBS += -lnetcdf_c++
> >
> > Then I checked /apps/netcdf-4.0.1, and could not find lnetcdf_c++. Would
> > you please give us some hints on this ?
>
> Ok, if you can't find libnetcdfcd _c++.so within the netcdf lib directory,
> then we have a few problems. In this situation, nc-config is your friend.
> First, let's make sure you are looking in the right place for netCDF:
>
> nc-config --prefix
>
> Now that we know where netCDF lives (or at least the one your account it able
> to see), let's see if it has c++ enabled:
>
> nc-config --has-c++
>
> Also, you will need to add -lnetcdf after -lnetcdf_c++ to your $(CSU)_LDLIBS
> flags in order to properly link to the netCDF library.
>
> Let me know what you find with nc-config :-)
>
> Cheers,
>
> Sean
>
>
> >
> > thanks.
> >
> > Tong Wei
> > GOES-R
> > 240 206 7095
> >
> >
> >
> >
> >
>
>
> Ticket Details
> ===================
> Ticket ID: FWY-763930
> Department: Support netCDF
> Priority: Normal
> Status: Open
>
>
Ticket Details
===================
Ticket ID: FWY-763930
Department: Support netCDF
Priority: Normal
Status: Open