Mail Archives: djgpp/2000/08/17/16:45:23
Radical NetSurfer <radsmail AT juno DOT com> schreef in artikel
<1u6ops46pog5cggn1o102tlig0msdqkmeo AT 4ax 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.
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 <stdlib.h>
int main(void)
{
printf("%s was compiled at %s\n",__FILE__,__TIME__);
return 0;
}
Is this what you want?
Doug
- Raw text -