www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/15/07:46:17

Date: Wed, 15 Nov 1995 13:24:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Teng Yong Jeffrey <93602081 AT neptune DOT np DOT ac DOT sg>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Question about DJGPP C syntax

On Wed, 15 Nov 1995, Teng Yong Jeffrey wrote:

> I unzipped the files inside and try compiling them, but
> somehow I couldn't get DJGPP to recognize the "far"
> declarations - what's the problem?

Short answer: tell gcc that `far' is defined to be an empty string, like 
this:
	gcc -c -Dfar myfile.c

or put `#define far' somewhere in the headers included by your program.

Long answer:

The problem is that `far' isn't a part of standard C.  16-bit DOS-based
compilers usually provide it as extension to allow access to data and code
which is larger than 64KBytes.  But DJGPP generates 32-bit code where you
have access to a flat address space with (virtually) no segmentation, so
it doesn't need this feature.  Just defining `far' (and 'near', and
`huge') away should solve your problems. 

- Raw text -


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