我在windows和cygwin下使用Armadillo。
尽管如此,Armadillo建议使用Mingw,Boost建议使用cygwin并避免使用mingw。因此,当我编译时,我会收到这样的警告。有没有办法在不破解Armadillo的源码的情况下修复这个警告?
警告在源代码中的位置是here。
main.cpp
#include <armadillo>
int main()
{
arma::mat A(5,10);
A.ones();
return 0;
}编译:
g++ main.cpp -std=c++11警告:
E:\test\temp>make
g++ main.cpp -std=c++11 -fdiagnostics-color=always
In file included from /usr/include/armadillo:50:0,
from main.cpp:1:
/usr/include/armadillo_bits/compiler_setup.hpp:72:123: note: #pragma message: WA
RNING: disabled use of C++11 features in Armadillo, due to incomplete support fo
r C++11 by Cygwin
#pragma message ("WARNING: disabled use of C++11 features in Armadillo, due
to incomplete support for C++11 by Cygwin")
^发布于 2017-02-22 06:47:31
它可能是最近添加到Armadillo中的,但下面的编译时标志似乎可以做到这一点:
g++ main.cpp -std=c++11 -DARMA_DONT_PRINT_CXX11_WARNINGhttps://stackoverflow.com/questions/34939879
复制相似问题