尝试使用RcppEigen
包时遇到了一些麻烦。我使用了发布here的示例。该功能起作用,但R产生了一系列类似的警告(如下例所示)。
In file included from example.cpp:1:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/RcppEigenForward.h:30:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/nguy2338/Library/R/3.4/library/RcppEigen/include/Eigen/Core:531:
/Users/nguy2338/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma clang diagnostic pop
那么,这些警告意味着什么,我应该如何处理这些警告?
答案 0 :(得分:0)
解决方案是
#define EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
#include <Eigen/Eigen>