On 4 June 2012 05:55, Alan Corey <alan01...@gmail.com> wrote: > They probably aren't broken, looks like I need to link in some library. B I > get "undefined reference to" when I try to compile/link. B Shouldn't this be > mentioned in the man page? > > B Alan > > /* > B test of llround() & round(), fails under 4.7 and 5.0 > */ > > #include <stdio.h> > #include <math.h> > #include <stdlib.h> > #include <sys/types.h> > > int main(void) { > B int64_t big; > B int anint; > > B big = llround(3/2); > B anint = round(3/2); > > B return 0; > } >
Compile with -lm. Cheers, Ville