delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/12/14:16:39

From: "A. Sinan Unur" <sinan DOT unur AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [Q] DJGPP setting...
Date: Fri, 12 Dec 1997 05:58:39 -0500
Organization: Cornell University (http://www.cornell.edu/)
Lines: 41
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <349118DE.C372CF9@cornell.edu>
References: <3490B080 DOT 3B6F AT internet-zahav DOT net> <3490FEFD DOT 7745 AT trash DOT lip6 DOT fr>
NNTP-Posting-Host: cu-dialup-0093.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Fabrice ILPONSE wrote:
> 
> Arie Ori wrote:
> >
> > For some reason, the DJGPP is not defined in my computer even though 
> > I wrote "set djgpp=c:/djgpp/djgpp.env" in my autoexec.
> > (Every time there's a #ifdef DJGPP sentence the result is false).
> > Anyway, I can't make the allegro library file bcoz of this.
> > Can anybody help me???
> >
> 
>         Hum!! I think #ifdef DJGPP is in an C file. If so this DJGPP 
> has nothing to do with the set djgpp. #ifdef is a pre-processor 
> directive. For the condition to be true, you must use #define 
> somewhere in the C file before #ifdef.

the pre-defined preprocessor directive identifying djgpp is __DJGPP__
(this is actually in the faq, but i do not have the reference right
now.)

see if the following works:

#include <stdio.h>

int main(void)
{
#ifdef __DJGPP__
  printf("DJGPP version: %d", __DJGPP__);
#endif
  return 0;
}

i.e. prints DJGPP version: 2 on the screen.
-- 
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA

mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/

- Raw text -


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