<div dir="ltr"><div>Morning Ed!<br><br>I'm looking around (googling) to understand what you mean and I'm not getting it. math.h is included in the program and exists in /usr/include. <br><br></div>Leam<br><br><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 10:30 AM, Ed Cashin <span dir="ltr"><<a href="mailto:ecashin@noserose.net" target="_blank">ecashin@noserose.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Maybe link the math library? A quick check suggests that's it.<div><br></div><div><div>[ecashin@marino ~]$ man floor | grep Link</div><div> Link with -lm.</div><div>[ecashin@marino ~]$ </div><br><div class="gmail_quote">
<div><div class="h5">
On Wed, Jun 19, 2013 at 10:18 AM, leam hall <span dir="ltr"><<a href="mailto:leamhall@gmail.com" target="_blank">leamhall@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr"><div><div>Not sure why I'm getting:<br><br></div>gcc -Wall -Werror -o rand rand.c<br>/tmp/ccAJ7e8S.o: In function `main':<br>rand.c:(.text+0x16): undefined reference to `floor'<br>collect2: ld returned 1 exit status<br>
<br>###<br></div>rand.c<br>###<br clear="all"><div><div><div><br>#include <stdio.h><br>#include <unistd.h><br>#include <stdlib.h><br>#include <math.h><br><br>int main(void) {<br><br> int num;<br>
float val = 2.3;<br> num = floor(val);<br> printf("num is %d.\n", num);<br><br> return 0;<br>}<span><font color="#888888"><br><br>-- <br><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div>
</font></span></div></div></div></div>
<br></div></div>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><span class="HOEnZb"></span><br></div></blockquote></div><br clear="all"><br>-- <br><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div>
</div></div>