Mail Archives: djgpp/1998/01/13/11:36:27
I am trying to compile a program which seems pretty simple and
straitforward to me, but it keeps giving the error message that it cannot
find the header files I specify and stops. I know that my DJGPP setup is
correct because I can compile other programs including the same headers and
with the same command line (gcc *.c), without any problems. I will include
in this message the problem program, and another program that compiles fine.
This one gives an error message stating that it cannot find the header files:
#include <math.c>
#include <stdio.c>
double the_function(int n) {
return (1/(sqrt(5)) * (pow(((1 + sqrt(5))/2), n) - pow(((1 - sqrt(5))/2),
n));
}
/*int main(void) {
int n;
for(n=0, n<10, n++) {
printf("The answers are:%f", the_function(n));
};
return (0);
}
This one compiles fine:
#include <math.h>
#include <stdio.h>
int main(void) {
return (0);
}
The only difference I can see is the body, which, to my knowledge shouldn't
have anything to do with the preprocessor finding the header files. I would
greatly appreciate any help.
Thanks alot,
Christopher.
- Raw text -