[NetCDF] - Error encountered when creating a "NcFile" object
Alion Sci
alionsci at gmail.com
Tue Nov 7 11:13:24 MST 2006
Ok, this is what my code snippet looks like:
------------------------------------------------------------------------------------------------------------------------------------------------------
This shows the details of one of my constructors. It is located in
DatatSet.cc,
it has a corresponding headerfile in DataSet.h and my executable is called
'datatest'.
/** Constructor #1 */
DataSet::DataSet( const char* fileName ) {
NcFile coreData(filename, NcFile::Replace);
.
.
.
// end of constructor
}
------------------------------------------------------------------------------------------------------------------------------------------------------
Now, the problem is that when I get to the 3rd line of code [ NcFile
coreData(filename, NcFile::Replace); ] the compiler goes nuts and gives me
the following error:
------------------------------------------------------------------------------------------------------------------------------------------------------
DataGrid.o: In function `DataGrid':/home/jstoup/WORK/trunk/DataGrid.cc:37:
undefined reference to `NcFile::NcFile(char const*, NcFile::FileMode,
unsigned int*, unsigned int, NcFile::FileFormat)'
:/home/jstoup/WORK/trunk/DataGrid.cc:37: undefined reference to
`NcFile::~NcFile()'
:/home/jstoup/WORK/trunk/DataGrid.cc:37: undefined reference to
`NcFile::NcFile(char const*, NcFile::FileMode, unsigned int*, unsigned int,
NcFile::FileFormat)'
:/home/jstoup/WORK/trunk/DataGrid.cc:37: undefined reference to
`NcFile::~NcFile()'
collect2: ld returned 1 exit status
make: *** [dataset_test] Error 1
------------------------------------------------------------------------------------------------------------------------------------------------------
Anyone have an idea as to why I am getting this linker error?
help would be cool,
thanks
AlionSci
More information about the netcdfgroup
mailing list