www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/17/13:46:44

From: Radical NetSurfer <radsmail AT juno DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: where is __FILE__/__DATE__ ?
Date: Thu, 17 Aug 2000 13:10:36 -0400
Message-ID: <1u6ops46pog5cggn1o102tlig0msdqkmeo@4ax.com>
References: <o9glpsk29ic6nhovs8rr6siagp9a2o38dv AT 4ax DOT com>
X-Newsreader: Forte Agent 1.8/32.548
X-No-Archive: yes
MIME-Version: 1.0
NNTP-Posting-Host: 216.202.134.194
X-Original-NNTP-Posting-Host: 216.202.134.194
X-Trace: 17 Aug 2000 13:13:29 -0400, 216.202.134.194
Lines: 38
X-Original-NNTP-Posting-Host: 64.31.79.51
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 16 Aug 2000 12:36:42 -0400, Radical NetSurfer
<radsmail AT juno DOT com> 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.

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.

>In Borland I can do something this, which I find VERY USEFUL:
>
>(topmost line in source)
>#pragma message Compiling __FILE__ on __DATE__ at __TIME__ 
>#pragma message Current Line __LINE__
>
>Which, obviously, simply displays, at Compile Time, the Filename of
>the source-code, and the Date/Time stamp of that particular compile.
>Likewise, I can see the actual line number whenever desired at any
>point in my source code... 
>(despite the use of #pragma, my question still relates to having and
> using __FILE__, etc.)
>
>NOW: how would I do this simplistic thing in DJGPP ?
>
>THANKS!
>
>Email is welcomed: radsmail AT juno DOT com
>Http:  members.tripod.com/~RadSurfer/

- Raw text -


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