October 11, 2002
Yeah, I would like too if
#pragma message __DMC__
worked, but I am not too sure about that.



Matthew Wilson wrote:

> You have to compile and run, and with my way you have to compile only.
>
> Actually, the honest answer is that I'm a bit compiler-detection obsessed, given the amount of cross-everything library work I do, so that was the first idea that popped into my head. ;)
>
> "Jan Knepper" <jan@smartsoft.us> wrote in message news:3DA643E6.ABFF313A@smartsoft.us...
> > Why not just
> >
> > int  main ()
> > {
> >     printf ( "%X\n", __DMC__ );
> >
> >     return (  0 );
> > }
> >
> >
> > Matthew Wilson wrote:
> >
> > > Try compiling the following program for a definitive answer
> > >
> > > #if __DMC__ == 0x826
> > > #error 8.26
> > > #elif __DMC__ == 0x827
> > > #error 8.27
> > > #elif __DMC__ == 0x828
> > > #error 8.28
> > > #elif __DMC__ == 0x829
> > > #error 8.29
> > > #elif __DMC__ == 0x830
> > > #error 8.30
> > > #else
> > > #error Unknown version
> > > #endif
> > >
> > > "Jeremy Brown" <jbrown@safestone.com> wrote in message news:ao1cgi$1ot5$1@digitaldaemon.com...
> > > >
> > > > "Walter" <walter@digitalmars.com> wrote in message news:ao0po3$153t$1@digitaldaemon.com...
> > > > > www.digitalmars.com/compiler.htm
> > > > >
> > > > >
> > > > >
> > > >
> > > > sc.exe from dmc830c.zip identifies itself as 8.29n
> > > >
> > > > 24/07/2002  10:09p              57,884 SC.EXE
> > > >
> > > > Downloading dmc.zip (ie latest) from the link given by walter is the
> same!
> > > >
> > > > Jeremy
> > > >
> > > >
> >

October 11, 2002
A truncated version of the code I use to do just what you say. :)

#define __stringize_ccver(x) #x
#define _stringize_ccver(x)  __stringize_ccver(x)

#if defined(__BORLANDC__)
#pragma message("__BORLANDC__: " _stringize_ccver(__BORLANDC__))
#elif defined(__DMC__)
#pragma message("DMC: " _stringize_ccver(__DMC__))
#elif defined(__GNUC__)
#pragma message("__GNUC__: " _stringize_ccver(__GNUC__))
#elif defined(__INTEL_COMPILER)
#pragma message("__INTEL_COMPILER: " _stringize_ccver(__INTEL_COMPILER))
#elif defined(__MWERKS__)
#pragma message("__MWERKS__: " _stringize_ccver(__MWERKS__))
#elif defined(_MSC_VER)
#pragma message("_MSC_VER: " _stringize_ccver(_MSC_VER))
#elif defined(__WATCOMC__)
#pragma message("__WATCOMC__: " _stringize_ccver(__WATCOMC__))
#else
#error Unrecognised compiler
#endif


"Jan Knepper" <jan@smartsoft.us> wrote in message news:3DA6E81F.99CBC1F7@smartsoft.us...
> Yeah, I would like too if
> #pragma message __DMC__
> worked, but I am not too sure about that.
>
>
>
> Matthew Wilson wrote:
>
> > You have to compile and run, and with my way you have to compile only.
> >
> > Actually, the honest answer is that I'm a bit compiler-detection
obsessed,
> > given the amount of cross-everything library work I do, so that was the first idea that popped into my head. ;)
> >
> > "Jan Knepper" <jan@smartsoft.us> wrote in message news:3DA643E6.ABFF313A@smartsoft.us...
> > > Why not just
> > >
> > > int  main ()
> > > {
> > >     printf ( "%X\n", __DMC__ );
> > >
> > >     return (  0 );
> > > }
> > >
> > >
> > > Matthew Wilson wrote:
> > >
> > > > Try compiling the following program for a definitive answer
> > > >
> > > > #if __DMC__ == 0x826
> > > > #error 8.26
> > > > #elif __DMC__ == 0x827
> > > > #error 8.27
> > > > #elif __DMC__ == 0x828
> > > > #error 8.28
> > > > #elif __DMC__ == 0x829
> > > > #error 8.29
> > > > #elif __DMC__ == 0x830
> > > > #error 8.30
> > > > #else
> > > > #error Unknown version
> > > > #endif
> > > >
> > > > "Jeremy Brown" <jbrown@safestone.com> wrote in message news:ao1cgi$1ot5$1@digitaldaemon.com...
> > > > >
> > > > > "Walter" <walter@digitalmars.com> wrote in message news:ao0po3$153t$1@digitaldaemon.com...
> > > > > > www.digitalmars.com/compiler.htm
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > sc.exe from dmc830c.zip identifies itself as 8.29n
> > > > >
> > > > > 24/07/2002  10:09p              57,884 SC.EXE
> > > > >
> > > > > Downloading dmc.zip (ie latest) from the link given by walter is
the
> > same!
> > > > >
> > > > > Jeremy
> > > > >
> > > > >
> > >
>


November 11, 2002

Matthew Wilson wrote:

> A truncated version of the code I use to do just what you say. :)
> 
> #define __stringize_ccver(x) #x
> #define _stringize_ccver(x)  __stringize_ccver(x)
> 
> #if defined(__BORLANDC__)
> #pragma message("__BORLANDC__: " _stringize_ccver(__BORLANDC__))
> #elif defined(__DMC__)
> #pragma message("DMC: " _stringize_ccver(__DMC__))
> #elif defined(__GNUC__)
> #pragma message("__GNUC__: " _stringize_ccver(__GNUC__))
> #elif defined(__INTEL_COMPILER)
> #pragma message("__INTEL_COMPILER: " _stringize_ccver(__INTEL_COMPILER))
> #elif defined(__MWERKS__)
> #pragma message("__MWERKS__: " _stringize_ccver(__MWERKS__))
> #elif defined(_MSC_VER)
> #pragma message("_MSC_VER: " _stringize_ccver(_MSC_VER))
> #elif defined(__WATCOMC__)
> #pragma message("__WATCOMC__: " _stringize_ccver(__WATCOMC__))
> #else
> #error Unrecognised compiler
> #endif
> 
> 



i searched for this one for years and was unable to display something else than "DMC: __DMC__" ..

thanks

roland

November 12, 2002
You're most welcome

"roland" <--rv@ronetech.com> wrote in message news:3DCF9748.5000307@ronetech.com...
>
>
> Matthew Wilson wrote:
>
> > A truncated version of the code I use to do just what you say. :)
> >
> > #define __stringize_ccver(x) #x
> > #define _stringize_ccver(x)  __stringize_ccver(x)
> >
> > #if defined(__BORLANDC__)
> > #pragma message("__BORLANDC__: " _stringize_ccver(__BORLANDC__))
> > #elif defined(__DMC__)
> > #pragma message("DMC: " _stringize_ccver(__DMC__))
> > #elif defined(__GNUC__)
> > #pragma message("__GNUC__: " _stringize_ccver(__GNUC__))
> > #elif defined(__INTEL_COMPILER)
> > #pragma message("__INTEL_COMPILER: " _stringize_ccver(__INTEL_COMPILER))
> > #elif defined(__MWERKS__)
> > #pragma message("__MWERKS__: " _stringize_ccver(__MWERKS__))
> > #elif defined(_MSC_VER)
> > #pragma message("_MSC_VER: " _stringize_ccver(_MSC_VER))
> > #elif defined(__WATCOMC__)
> > #pragma message("__WATCOMC__: " _stringize_ccver(__WATCOMC__))
> > #else
> > #error Unrecognised compiler
> > #endif
> >
> >
>
>
>
> i searched for this one for years and was unable to display something else than "DMC: __DMC__" ..
>
> thanks
>
> roland
>


1 2
Next ›   Last »