From: "doug" Newsgroups: comp.os.msdos.djgpp Subject: Re: where is __FILE__/__DATE__ ? Date: 17 Aug 2000 20:19:26 GMT Organization: Rijksuniversiteit Groningen Lines: 37 Message-ID: <01c00952$cf6bf160$c8247d81@default> References: <1u6ops46pog5cggn1o102tlig0msdqkmeo AT 4ax DOT com> NNTP-Posting-Host: client36-200.oprit.rug.nl X-Trace: info.service.rug.nl 966543566 29414 129.125.36.200 (17 Aug 2000 20:19:26 GMT) X-Complaints-To: newsmaster AT rug DOT nl NNTP-Posting-Date: 17 Aug 2000 20:19:26 GMT X-Newsreader: Microsoft Internet News 4.70.1155 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Radical NetSurfer schreef in artikel <1u6ops46pog5cggn1o102tlig0msdqkmeo AT 4ax DOT com>... > On Wed, 16 Aug 2000 12:36:42 -0400, Radical NetSurfer > wrote: > > >Does DJGPP suppport __FILE__, __DATE__, __LINE__, etc? > > Apparently these do exist, since when I > #define __FILE__ foo_bar > I get a re-definition error.... > > I still have NO CLUE how to get these to display during compile > times. I think it rediculuous that #message does not exist, > or that #warning does not expand macro's. > Thats why people use Borland, etc. Is #warning part of the C or C++ standard? You can't really expect DJGPP to implement Borlands extensions. > PLEASE if you can provide a REAL, working example > for how GCC, or a MAKE file, can display the actual > date, time of Compile, please show me. THANKS. Just use __FILE__ and __TIME__ in a printf statement. (not checked for errors) #include int main(void) { printf("%s was compiled at %s\n",__FILE__,__TIME__); return 0; } Is this what you want? Doug