[lammps-users] Building LAMMPS: error message

Hi Again

I have been trying to build LAMMPS using the Solaris makefile (and serial makefile) I obtained yetserday. The build runs succesfully until a point where it lists this error message.

pair_lj_charmm_coul_long.cpp: In member function virtual void PairLJCharmmCoulLong::compute(int, int)': pair_lj_charmm_coul_long.cpp:137: error: sqrtf’ undeclared (first use this function)
pair_lj_charmm_coul_long.cpp:137: error: (Each undeclared identifier is reported only once for each function it appears in.)
pair_lj_charmm_coul_long.cpp: In member function virtual void PairLJCharmmCoulLong::compute_outer(int, int)': pair_lj_charmm_coul_long.cpp:483: error: sqrtf’ undeclared (first use this function)
pair_lj_charmm_coul_long.cpp: In member function void PairLJCharmmCoulLong::init_tables()': pair_lj_charmm_coul_long.cpp:868: error: sqrtf’ undeclared (first use this function)
make[1]: *** [pair_lj_charmm_coul_long.o] Error 1
make[1]: Leaving directory `/homedir/ucs404/LAMMPS/lammps-15Dec06/src/Obj_serial’
make: *** [serial] Error 2

I assume that somewhere ‘sqrtf’ should have been previously declared.

What am I doing wrong?

Can anyone help?

Rick

sqrtf() is just a version of sqrt() that works on a single precision
argument. I've never seen this error, so I assumed all C++ compilers
have it defined in math.h

But Googling on sqrtf shows there are occasional problems. If you
can't find sqrtf() defined in any of your system of libc header files,
you can edit the source files to change sqrtf() to sqrt() without
causing any problems.

Steve