There is already a question on this but it's unanswered.
I'm writing a C++ header file that requires libxml
, as seen below
#include <libxml2/libxml/xpath.h>
However Flycheck sees this as an error and consequently ignores any other potential error in the file.
In include /usr/include/libxml2/libxml/xpath.h (c/c++-gcc)
How do I disable this error in Flycheck or at least configure it to recognize the rest of the errors in the file?
Here's my code:
#ifndef PATH_T_HPP
#define PATH_T_HPP
#include <string>
#include <libxml2/libxml/xpath.h>
namespace tw_lmm
{
class path_t
{
public:
/* Constructors */
explicit path_t(const xmlKey*); // path only
explicit path_t(const xmlKey*, const xmlKey*); // path, name
explicit path_t(const xmkKey*, const xmkKey*, const xmkKey*); // path, name, extension
explicit path_t(const path_t&);
inline path_t operator=(const std::string&); // path only
/* Destructors */
virtual ~path_t();
/* Getters */
const inline std::string& path() const;
const inline std::string& name() const;
protected:
std::string __path, __name, __extension;
};
const inline std::string& path_t::path() const
{
return __path;
}
}
#endif
Note I misspelt xmlKey
by writing xmkKey
, Flycheck doesn't seem to recognise this.