Sin Math Function Error Compiling
Posted: Wed Aug 03, 2022 10:29 am
I have the following error when trying to compile
gcc main.c -o a.out -lphidget22
/usr/bin/ld: /tmp/ccoh9Nkx.o: undefined reference to symbol 'sin@@GLIBC_2.4'
/usr/bin/ld: /lib/arm-linux-gnueabihf/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
The code is
#include <math.h>
double sinx = sin(0);
What I am missing.
gcc main.c -o a.out -lphidget22
/usr/bin/ld: /tmp/ccoh9Nkx.o: undefined reference to symbol 'sin@@GLIBC_2.4'
/usr/bin/ld: /lib/arm-linux-gnueabihf/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
The code is
#include <math.h>
double sinx = sin(0);
What I am missing.