Author Topic: sin function for gcc in pdaxrom?  (Read 711 times)

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
sin function for gcc in pdaxrom?
« on: November 03, 2004, 01:30:13 pm »
Hi,

I'm writing some DSP stuff in C and i found trouble trying to get sin / cos functions... any advice? i tried including math.h and tgmath.h...
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.

blakeyez

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://
sin function for gcc in pdaxrom?
« Reply #1 on: November 03, 2004, 03:03:32 pm »
I'm able to build this:

Code: [Select]
#include
#include

int main(void)
{
  printf("sin(%f) = %f\n", 1.0, sin(1.0));
  return 0;
}

like this:

Code: [Select]
$ gcc -o sintest sintest.c -lm
and it works fine here.

Dave

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
sin function for gcc in pdaxrom?
« Reply #2 on: November 04, 2004, 06:53:34 am »
score! thank you very much, the -lm did it...
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.