Maybe link the math library?  A quick check suggests that&#39;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">
On Wed, Jun 19, 2013 at 10:18 AM, leam hall <span dir="ltr">&lt;<a href="mailto:leamhall@gmail.com" target="_blank">leamhall@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Not sure why I&#39;m getting:<br><br></div>gcc -Wall -Werror -o rand rand.c<br>/tmp/ccAJ7e8S.o: In function `main&#39;:<br>rand.c:(.text+0x16): undefined reference to `floor&#39;<br>collect2: ld returned 1 exit status<br>

 <br>###<br></div>rand.c<br>###<br clear="all"><div><div><div><br>#include &lt;stdio.h&gt;<br>#include &lt;unistd.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;math.h&gt;<br><br>int main(void) {<br><br>    int num;<br>

    float val = 2.3;<br>    num = floor(val);<br>    printf(&quot;num is %d.\n&quot;, num);<br><br>    return 0;<br>}<span class="HOEnZb"><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>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">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><br><br clear="all"><div><br></div>-- <br>  Ed Cashin &lt;<a href="mailto:ecashin@noserose.net">ecashin@noserose.net</a>&gt;<br>  <a href="http://noserose.net/e/">http://noserose.net/e/</a><br>  <a href="http://www.coraid.com/">http://www.coraid.com/</a>
</div>