[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #XBB-605615]: Error with netcdf
- Subject: [netCDF #XBB-605615]: Error with netcdf
- Date: Mon, 05 Oct 2015 14:14:28 -0600
Hello Nishant,
I'll need a little more information; what version of the netCDF C++ interface
are you using, and what version of the underlying netCDF-C library was it built
against? Also, how are you trying to compile this program you included? It
looks like perhaps you are not linking it properly against the C++ interface.
-Ward
> Full Name: Nishant Sharma
> Email Address: address@hidden
> Organization: San Jose State University
> Package Version:
> Operating System:
> Hardware:
> Description of problem: Hi,
> I'm getting following error. Please let me know if you need any other details.
>
> Code
>
> #include <iostream>
> #include <iomanip>
> #include <netcdf>
>
> using namespace std;
> using namespace netCDF;
> using namespace netCDF::exceptions;
>
>
> int main()
> {
>
> NcFile
> dataFile("/home/nishant/Documents/SJSU/CMPE275/Project/test/20140101_0000.gz",NcFile::read);
> cout<<"there are "<<dataFile.getVarCount()<<" variables"<<endl;
>
>
> }
>
>
>
> readfile.o: In function `main':
> readfile.cpp:(.text+0x5a): undefined reference to
> `netCDF::NcFile::NcFile(std::string const&, netCDF::NcFile::FileMode)'
> readfile.cpp:(.text+0x83): undefined reference to
> `netCDF::NcGroup::getVarCount(netCDF::NcGroup::Location) const'
> readfile.cpp:(.text+0xc4): undefined reference to `netCDF::NcFile::~NcFile()'
> readfile.cpp:(.text+0xeb): undefined reference to `netCDF::NcFile::~NcFile()'
> readfile.cpp:(.text+0x116): undefined reference to `netCDF::NcFile::~NcFile()'
> collect2: error: ld returned 1 exit status
>
>
>
Ticket Details
===================
Ticket ID: XBB-605615
Department: Support netCDF
Priority: Normal
Status: Closed