Mail Archives: djgpp/1995/11/15/07:46:17
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 -