Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
124 stars 49 forks source link

add const qualifier to NcFile header signatures #130

Closed hellkite500 closed 1 year ago

hellkite500 commented 1 year ago

Fixes #129

This same issue may occur in other headers as well. Will see if this addresses an odd linking issue experienced on an intel c++ compiler. If it does, the rest of the code may need to be looked at and updated as well.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

ZedThree commented 1 year ago

This should have no affect on linking. The enum is passed by value, so the const will have no affect on the function signature.

hellkite500 commented 1 year ago

It is speculation on my part. But my colleague is getting this error:

undefined reference to 'netCDF::NcFile::NcFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, netCDF::NcFile::FileMode)

From an Intel linker. It is looking for a function signature with a const string reference and non const filemode, which is the signature in the header, but not the signature in the implementation.