[Disksim-users] disksim compile error undefined reference to `sqrt

Lei Tian leitian.hust at gmail.com
Thu Aug 23 12:29:34 EDT 2012


I met the same problem before. In my memory, the solution is simple: adjust the appearance  of the "-lm" parameter to be the last parameter. You can have a try.

Lei


On Aug 23, 2012, at 11:24 AM, 孙龙 wrote:

> Hi all, I met the same problem as https://sos.ece.cmu.edu/pipermail/disksim-users/2011-December/000699.html. But I didn't find any solutions. Can anyone help me?
> 
> 
> "Hi all,
> 
> I'm trying to compile the DiskSim 4.0 and have the following error:
> 
> "...memsmodel/mems_piecewise_seek.c:524: undefined reference to `sqrt'"
> 
> and so on... (see the log file)
> 
> It seems to be a problem with the mathlib link, however I've check in
> the makefile, and there is all ok (i.g. gcc -lm ...).
> 
> I'm actually not very familar with C/C++ and linux systems, so I'm in trouble :)"
> _______________________________________________
> Disksim-users mailing list
> Disksim-users at ece.cmu.edu
> https://sos.ece.cmu.edu/mailman/listinfo/disksim-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20120823/51c99541/attachment.html>


More information about the Disksim-users mailing list