未定义的对'round'c语言的引用

Itz*_*984 4 c eclipse compiler-errors

我正在使用那些进口商品

#include <stdio.h>
#include <math.h>
Run Code Online (Sandbox Code Playgroud)

我在这一行得到了未定义的'round'引用:

double res = round(atof(nextVal));
Run Code Online (Sandbox Code Playgroud)

nextVal是从文件读取的double值.

我正在使用Eclipse INDIGO.

Aif*_*Aif 15

在命令行中,必须指定-lmgcc选项以链接数学库.你必须在eclipse中找到如何做到这一点.