Code: Select all
float float2_length(float2* a) {
return sqrtf(a->x * a->x + a->y * a->y);
}
Then I add the lib path and the library to my psp-project Makefile, but when I compile this i get an linker error: undefined refernce to sqrtf.
I can use the sqrtf function in the psp-project without getting this error. So I tried to add the math library (-lm) and path to the library Makefile, but that didn't solve it. The confusing thing is, I can use some other functions in my library with out getting linker errors. I used the sceIo... functions and it work. Why not the math functions?
Yes i tried to search for this problem and found a lot of sqrtf problems, but using sqrtf in my main.c is not the problem. Install new toolchain and sdk didn't fix it too.