[gmx-developers] How to include <math.h> when Adding code in md.c

Gerrit Groenhof ggroenh at gwdg.de
Tue Mar 29 10:21:13 CEST 2011

  what is squr?


On 03/29/2011 10:19 AM, Yukun Wang wrote:
> Hi all:
>      I add some code in the end of md.c, in which I called a function 
> "sqrt()", and at the start of md.c I add: #include <maths.h>.
>      As you know "sqrt()" is an often used function in the mathlib of 
> C, however, when I complie this code, system give an error:
> md.c:3011: error: `squr' undeclared (first use in this function)
> md.c:3011: error: (Each undeclared identifier is reported only once
> md.c:3011: error: for each function it appears in.)
> make[3]: *** [md.o] Error 1
> I guess I included a wrong mathlib headfile,is there anyone can tell 
> me when Gromacs itself need to extract a root which headfile was included?

More information about the gromacs.org_gmx-developers mailing list