【发布时间】:2017-02-14 16:41:42
【问题描述】:
我正在尝试使用 MingW (msys2) 在 Windows 上编译一个程序,但它使用 j0 函数失败。在 Linux 上它编译没有问题。当我在编译器上使用 -std=c++11 标志时,它似乎很讨厌。我怎样才能让它正确编译并打开 -std=c++11 标志?
示例代码:
#include <cmath>
int main( int argc, char *argv[] )
{
float test = j0( 5 );
}
输出
$ g++ -std=c++11 test.cpp -o test
test.cpp: In function 'int main(int, char**)':
test.cpp:6:21: error: 'j0' was not declared in this scope
float test = j0( 5 );
【问题讨论】: