This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

math.h


when i try to use any function from math.h pow, sin, cos, etc, i get the
following message:  /tmp/cc5Ig4Rz.o: In function `main':
/tmp/cc5Ig4Rz.o(.text+0x15): undefined reference to `sinl'
/tmp/cc5Ig4Rz.o(.text+0x59): undefined reference to `csinl'
/tmp/cc5Ig4Rz.o(.text+0x8e): undefined reference to `sin'
/tmp/cc5Ig4Rz.o(.text+0xd1): undefined reference to `csin'
/tmp/cc5Ig4Rz.o(.text+0x102): undefined reference to `sinf'
/tmp/cc5Ig4Rz.o(.text+0x141): undefined reference to `csinf' collect2: ld
returned 1 exit status when i use "tgmath.h" or the following if i use
math.h:
/tmp/ccLaU4pw.o: In function `main': /tmp/ccLaU4pw.o(.text+0xb):
undefined reference to `sin'
collect2: ld returned 1 exit status                                             

the source code is: 
#include <math.h> #include <stdio.h>
 
int main() {
  printf("%lf\n", sin(1));
  return 0;
}                                                                               


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]