Re: How to tell which compiler in C code?



If the compiler build number is different between eVC++ and WCE you can use
the predefined macros:
_MSC_BUILD, _MSC_FULL_VER, but it is not very safe since compilers can be
updated.
According to your code snippet you will use CEPC/PB or iPaq/eVC++: in this
case it is better
if you test the processor architecture
--

Luca Calligaris
www.eurotech.it


"WinCE Trier" <WinCETrier@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel
messaggio news:621F5BF0-2EE3-49CA-9753-29EDD528671F@xxxxxxxxxxxxxxxx
Our DLL will be used both in EVC 4.0 and WINCE4.2, and we plan to add
different code according to the compiler. So we need to know how to tell
which compiler in C code? Is there any predefined things to indicate this?

#if defined(XXXXX)
/* do something here for CEPC in PB */
.........
#else
/* do alternate here for iPaq in EVC4 */
........
#endif



Thanks for any suggestion!
Cetrier


.



Relevant Pages

  • Re: Reflections on a classic Lisp Paper
    ... lisp dialects. ... user-defined special forms - Macros, Fexprs, and Nlambda. ... compilable because the compiler just couldn't do it. ...
    (comp.lang.lisp)
  • Re: Cpp Considered Harmful
    ... > However, in either case, assertions are invaluable in making certain ... because we now have our own cpp ... > macros, we can use several different compilers and have our system ... > built into the compiler. ...
    (comp.lang.cpp)
  • Re: Doing mini-languages in CL
    ... > Thats it in a nutshell. ... I think the detail to note is that the Macro facility is a Compiler ... simply put you may well be able to leverage CL macros in building your ...
    (comp.lang.lisp)
  • Re: Why doesnt Lisp automatically differentiate functions and macros?
    ... what stops a Lisp machine from figuring automatically which ... small subset of things macros can do that you are thinking is all they can ... This requires the compiler to know how to do things. ... things that the compiler writer didn't think to, ...
    (comp.lang.lisp)
  • Re: Doing mini-languages in CL
    ... "Will Hartung" writes: ... >> address fixup grunt work to it. ... > Your compiler will already take S-exprs, but there's nothing that says those ... and you find you won't necessarily need macros. ...
    (comp.lang.lisp)