warning: implicit declaration
doggiedoc
Posts: 2,245
I'm not sure how to correct this warning.
As an exercise I am converting HB25.spin for SimpleIDE and wanted to set compile option to C99 to allow inline declarations, see this thread. But in the process, the code now generates the above warning where I try to use the absolute value function. Do I need a header declaration to resolve this warning? On a guess a tried adding #include <math.h> but that was not it. Here's the code snippet.
Thanks!
Paul
HB25.c:54:5: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
As an exercise I am converting HB25.spin for SimpleIDE and wanted to set compile option to C99 to allow inline declarations, see this thread. But in the process, the code now generates the above warning where I try to use the absolute value function. Do I need a header declaration to resolve this warning? On a guess a tried adding #include <math.h> but that was not it. Here's the code snippet.
void Pause(int Duration) { int ClkCycles = (abs(Duration) * (CLKFREQ / 1000000) - 1050); waitcnt(ClkCycles + CNT); }
Thanks!
Paul
Comments
It's a jewel because they have gone an extra step in completeness and also examples in several pages.
If you have a library function name and need a page on it, replace abs in the link with the function. I.E.
http://pubs.opengroup.org/onlinepubs/009695399/functions/strtod.html
Other sites provide something similar:
http://www.manpagez.com/man/3/strtod/
http://linux.die.net/man/3/strtod
Having an AJAX or other web script that makes these URLs would be great.
Hi Steve, here is a quick and dirty C function browser, just type in the C function keyword and click go or hit enter.
It needs DotNet 2.0 to run.
Cheers
Very nice work. Mac and Linux folks are out of luck though without using mono.
A google app would be easy to integrate at parallax.propellergcc.com ... guess I have to look at that more. Are google apps limited to chrome users?