错误:'log1p'不是'std'的成员

时间:2016-02-21 12:46:53

标签: c++ c++11 cygwin armadillo gcc5

我创建了一个简单的main函数,在它上面,我包含了armadillo库。

#include <armadillo>

我使用g ++(GCC的版本是5.3)和在windowse 8的cygwin 64bit下编译它。我打开了c ++ 11选项并添加-larmadillo以链接到armadillo库。

编译代码后,我收到了如此可怕的错误。相同的代码在windowse XP 32位上运行绝对正常。

usr/include/armadillo_bits/compiler_setup.hpp:73:88: note: #pragma message: WAR

NING: #define ARMA_DONT_USE_CXX11 before #include <armadillo>

     #pragma message ("WARNING: #define ARMA_DONT_USE_CXX11 before #include <arm

adillo>")



        ^

In file included from /usr/include/armadillo:310:0,

                 from main.cpp:1:

/usr/include/armadillo_bits/arma_cmath.hpp: In function 'float arma::arma_log1p(

float)':

/usr/include/armadillo_bits/arma_cmath.hpp:270:12: error: 'log1p' is not a membe

r of 'std'

     return std::log1p(x);

            ^

compilation terminated due to -Wfatal-errors.

Makefile:110: recipe for target 'main.o' failed

make: *** [main.o] Error 1

0 个答案:

没有答案