Reputation: 16794
I'm using those imports
#include <stdio.h>
#include <math.h>
and I'm getting undefined reference to `round' at this line:
double res = round(atof(nextVal));
nextVal is a double value read from a file.
I'm using Eclipse INDIGO.
Upvotes: 4
Views: 11721
Reputation: 11220
In command line, you must specify -lm
option to gcc to link the math lib. You have to find how to do so in eclipse.
Upvotes: 15