"adjust the appearance  of the "-lm" parameter to be the last parameter". It works. Thank you for your help.<br><br><div class="gmail_quote">2012/8/24 Yipkei Kwok <span dir="ltr"><<a href="mailto:ykwok2@miners.utep.edu" target="_blank">ykwok2@miners.utep.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2 things that you may want to check<br>
<br>
1. sqrt() may require the math.h header. Does the C file include the header?<br>
2. Is your libm.a in a non-standard location? If yes, you need to use<br>
the gcc flag -L to indicate the location of the library<br>
<br>
Good luck. Hope it helps.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Aug 23, 2012 at 10:24 AM, ËïÁú <<a href="mailto:nianglao@gmail.com">nianglao@gmail.com</a>> wrote:<br>
> Hi all, I met the same problem as<br>
> <a href="https://sos.ece.cmu.edu/pipermail/disksim-users/2011-December/000699.html" target="_blank">https://sos.ece.cmu.edu/pipermail/disksim-users/2011-December/000699.html</a>.<br>
> But I didn't find any solutions. Can anyone help me?<br>
><br>
><br>
> "Hi all,<br>
><br>
> I'm trying to compile the DiskSim 4.0 and have the following error:<br>
><br>
> "...memsmodel/mems_piecewise_seek.c:524: undefined reference to `sqrt'"<br>
><br>
> and so on... (see the log file)<br>
><br>
> It seems to be a problem with the mathlib link, however I've check in<br>
> the makefile, and there is all ok (i.g. gcc -lm ...).<br>
><br>
> I'm actually not very familar with C/C++ and linux systems, so I'm in<br>
> trouble :)"<br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Disksim-users mailing list<br>
> <a href="mailto:Disksim-users@ece.cmu.edu">Disksim-users@ece.cmu.edu</a><br>
> <a href="https://sos.ece.cmu.edu/mailman/listinfo/disksim-users" target="_blank">https://sos.ece.cmu.edu/mailman/listinfo/disksim-users</a><br>
><br>
</div></div></blockquote></div><br>