Mail Archives: djgpp/1997/11/25/00:04:08
At 08:33 11/24/1997 GMT, QBall1723 wrote:
>>Subject: Basic library functions WON'T work!! Help
>>From: Daniel Gowans <daniel DOT gowans AT m DOT cc DOT utah DOT edu>
>>Date: Thu, Nov 13, 1997 02:53 EST
>>Message-id: <346AB1E2 DOT D98AEB2F AT m DOT cc DOT utah DOT edu>
>>
>>I just downloaded DJGPP. I tried to test it by compiling a few small
>>programs. Alas,
>>I cannot get it to work. The header file information
>>just doesn't work. I even tried inserting the contents of the
>>necessary header files directly into the program to no avail.
>>even with iostream.h embedded in my file it gave the following errors:
>>
>>
>
> I had this problem as well... and I looked in the FAQs for the answer...
>I found it... but alas.. could not understand it... BUT!!!!
>
> Here's what I did....
>
> I changed the filenames from STUPIDS.c to STUPIDS.CC...
>believe it or not... that worked
I think somebody already mentioned this. I'm not at all surprised that this
would work. GCC determines the language of a source file from its extension.
A `.c' file is assumed to be standard {K&R,ANSI,GNU} C; the standard C
header places are searched, etc. `.cc' is assumed to be C++, and headers are
searched for in different places, the C++ compiler is run instead, etc, etc.
For a full list of the extensions grokked by GCC, see the info node of GCC
entitled "Overall Options".
Nate Eldredge
eldredge AT ap DOT net
- Raw text -