Re: OT: sqrt() not recognized in c program??
On Sun, Apr 18, 1999 at 10:27:19AM -0700, kaynjay@igalaxy.net wrote:
> Does someone know why I would get the following errors in a compilation of a
> C app? I would think that the sqrt function is in one of the libraries
> defined in the beginning of the code (e.g. #include <math.h> ).
>
> kaynjay:/home/autodock/dist_3.0/src/autotors# cc -o autotors autotors.c
^^^^^^
cc -lm -o ...
^^^^ don't forget to link the math library :)
HTH
Ivan.
> /tmp/ccc01215: In function 'check_aromatic':
> /tmp/ccc01215(.text+0x1b4f): undefined reference to 'sqrt'
> /tmp/ccc01215: In function 'main':
> /tmp/ccc01215(.text+0xa586): undefined reference to 'sqrt'
> /tmp/ccc01215(.text+0xba83): undefined reference to 'sqrt'
>
> The compile dies with these.
>
> There are no directions for compiling. I'm following the same pattern given
> for another program in the distribution.
>
> Thanks for any help!
>
> Kenward Vaughan
>
>
> --
> Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
>
Reply to: