3

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

#include <armadillo>

我使用 g++(GCC 版本为 5.3)并在 windows 8 上的 cygwin 64bit 下编译它。我打开了 c++11 选项并添加-larmadillo了链接到犰狳库。

一旦我编译代码,我就会收到如此可怕的错误。相同的代码在 windows 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
4

0 回答 0