Hi,
I use GCC 4.0.3 and i included math.h and stdlib.h.
My program compiles and runs with sin() and pow() function, but doesn't with sqrt().
Compiler claims undefined __errno.
Defining this variable on my own i success.
Where is the compiler error source?
Thanks,
M T
Hilscher Gesellschaft für Systemautomation mbH
The Standard C library that comes with the compiler (I assume it is the Hitex compiler) needs this. Hitex uses the newlib library as Standard C library.
Usually the variable "errno" is used as a global variable containing the error of the last function. See below for the sqrt function inside the newlib library (which can be downloaded from http://sourceware.org/newlib/).
The library expects "errno" (respectively __errno) to be provided by an O/S or the user.
Regards
MT