Skip to content
This repository was archived by the owner on Aug 15, 2020. It is now read-only.

build error due to mismatch libnetcdf-c++4 API #226

Description

@jeng1220

It threw:

usr/include/ncException.h:27:7: note:   candidate expects 3 arguments, 4 provided
NNNetwork.cpp:4001:141: error: no matching function for call to 'netCDF::exceptions::NcException::NcException(const char [12], std::__cxx11::basic_string<char>, const char [14], int)'
                 throw NcException("NcException", "NNetwork::NNetwork: No weights supplied in NetCDF input file " + fname, __FILE__, __LINE__);

the available constructors of NcException in libnetcdf-c++4 are (link):

    class NcException : public std::exception {
    public:
      NcException(const char* complaint, const char* fileName, int lineNumber);
      NcException(int errorCode, const char* complaint, const char* fileName, int lineNumber);

there is no constructor accepting arguments like (const char*, const std::string&, const char*, int)

  • OS: Ubuntu 18.04
  • libnetcdf-c++4: 4.3.0+ds-5 (installed by apt install command)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions