|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
use nm
cos is in the libm (I think)
so use -lm
On Sat, 22 May 1999, David L. Martin wrote:
> I am currently trying to convert all of my diagnostic code over to Linux.
> Every thing is running smooth until I start using trig functions.
> The problem appears to be a library not being include, but how do I find
> out which library has the trig functions?
>
> /* Test file start ##################################*/
> #include <math.h>
> #include <stdlib.h>
> #include <stdio.h>
>
> void main(void)
> {
> printf("cos(0.1) = %f\n",cos(0.1));
> }
> /* Test file end ######################################*/
>
>
> /* GCC Output */
> /tmp/cca038091.o: In function `main':
> /tmp/cca038091.o(.text+0xe): undefined reference to `cos'
>
> --
>
> David L. Martin <dlmarti@njcc.com>
> R&D Software Engineer http://pluto.njcc.com/~dlmarti
> PGP: 16 C0 C0 AB 4E A2 2C 89 FF 8B 07 CF C0 72 3D 89
>
> Fidelity: A virtue peculiar to those who are about to be betrayed.
>
>
>
> --
> To unsubscribe, send a message with the word 'unsubscribe' in the subject
> or body of your message to plug-request@lists.nothinbut.net
>
--
To unsubscribe, send a message with the word 'unsubscribe' in the subject
or body of your message to plug-request@lists.nothinbut.net
|
|