delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/13/11:36:27

Message-Id: <3.0.1.32.19980113183408.00690a8c@pop5.ibm.net>
Date: Tue, 13 Jan 1998 18:34:08 +0200
To: <djgpp AT delorie DOT com>
From: Christopher <fibonacci AT ibm DOT net>
Subject: Seemingly strange problem
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019