swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use trigonometric functions in Swarm?


From: Perrone Alessandro
Subject: How to use trigonometric functions in Swarm?
Date: Mon, 19 Jun 2000 12:55:27 +0200

Hi
I have to use in my simulation some trigonometric functions.
I imported the right header, but when I call the sin(x) function, an error occur!!
I am using Linux on my Imac, with Swarm 2.1.1
Here it is the result with a simple program:

------
address@hidden apps]# gcc alex.c -o alex
/tmp/ccHDfVDm.o: In function `main':
/tmp/ccHDfVDm.o(.text+0x20): undefined reference to `sin'
/tmp/ccHDfVDm.o(.text+0x20): relocation truncated to fit: R_PPC_REL24 sin
collect2: ld returned 1 exit status
address@hidden apps]# more alex.c
#include <stdio.h>
#include <math.h>

int main () {
   float a;
   a=(float) sin((double) 1.0);
   printf("%f\n",a);
return 0;
}
address@hidden apps]# gcc -I/usr/include alex.c -o alex
/tmp/cck3PTSF.o: In function `main':
/tmp/cck3PTSF.o(.text+0x20): undefined reference to `sin'
/tmp/cck3PTSF.o(.text+0x20): relocation truncated to fit: R_PPC_REL24 sin
collect2: ld returned 1 exit status
address@hidden apps]#

-----
Any ideas?
Thank a lot for everything.
                                        ALEX

                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]