You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to compile and link the following code using the terminal-gcc
command for compiling C programs I get an undefined reference error.
#include <stdio.h>
#include <math.h>
int main()
{
double a = 0.5;
asin(a); // simple call to arc-sinus function in math.h
return 0;
}
I get the following error: undefined reference to `asin'
I tried using int, float, long double, but nothing helps.
Oddly enough, when I use a constant value instead: "asin(0.5)" the code
compiles with no errors.
I'm using terminal-ide system version v2.0 with GCC 4.4.0 (arm-eabi-gcc) on
Adroid 4.0.4 running on a Prestigio tablet, model PMP5580c.
I've stumbled upon cases where the sin, cos, tan, functions would fail from the
same linker error but this happens from time to time depending on the context
they're used in.
I believe this is a general issue for all trigonometric functions in the math.h
library and it's giving me a hard time running some C programs which use
user-defined complex number calculations.
Original issue reported on code.google.com by [email protected] on 7 Sep 2014 at 11:44
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 7 Sep 2014 at 11:44The text was updated successfully, but these errors were encountered: