nci / drishti

Drishti
MIT License
173 stars 39 forks source link

Undefined references to netcdf classes #11

Open Scindix opened 8 years ago

Scindix commented 8 years ago

I'm on Arch Linux and I'm trying to compile the recent version of drishti. However I encountered some problems. I had to install the files /usr/include/ncvalues.h and /usr/include/netcdfcpp.h (Ifound them via google here: ftp://ftp.geomar.de/users/astrehz/include/ ). Also I had to install the packages netcdf-cxx and netcdf. And I had to generate thefollowing link: ln /usr/lib/libnetcdf_c++4.so /usr/lib/libnetcdf_c++.so But I still get some errors with undefined references:

networkobject.cpp:(.text+0xb98d): undefined reference to `NcError::~NcError()'
networkobject.cpp:(.text+0xbb5e): undefined reference to `NcVar::get(short*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xbcdc): undefined reference to `NcVar::get(signed char*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xbda2): undefined reference to `NcVar::get(int*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xbe66): undefined reference to `NcVar::get(signed char*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xbf1e): undefined reference to `NcVar::get(float*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xbfdb): undefined reference to `NcVar::get(int*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xc08c): undefined reference to `NcVar::get(float*, long, long, long, long, long) const'
networkobject.cpp:(.text+0xc112): undefined reference to `NcError::~NcError()'
networkobject.cpp:(.text+0xc129): undefined reference to `NcFile::~NcFile()'
networkobject.cpp:(.text+0xc210): undefined reference to `NcFile::get_var(char const*) const'
networkobject.cpp:(.text+0xc22b): undefined reference to `NcFile::get_var(char const*) const'
networkobject.cpp:(.text+0xc246): undefined reference to `NcFile::get_var(char const*) const'
collect2: error: ld returned 1 exit status
Makefile:926: recipe for target '../bin/drishti' failed
make: *** [../bin/drishti] Error 1

I guess the problem is that I need an older version of netcdf, which would explain the two missing files, but I'm not really sure. What are my next steps? I really need this program. If I can't get it to work I will have to use wine or windows.

Scindix commented 8 years ago

Okay I got it working now. I deleted /usr/lib/libnetcdf_c++.so and copied the files from ftp://ftp.geomar.de/users/astrehz/lib/ to /usr/lib Sorry for any inconvenience.