On Tue, Apr 9, 2024 at 5:46 PM Paul Dufresne via Freedos-devel
<freedos-devel@lists.sourceforge.net> wrote:
>
> But installing I16BUTIIL,
> SET DJDIR=C:\DEVEL\I16GNU
> i16gcc -o hel2.exe hel2.c
> works!
>
[..]


The DJGPP environment variable just needs to point to a file called
DJGPP.ENV (or whatever) that contains a bunch of environment settings
for programs that were compiled with DJGPP. For example, this file
contains stanzas for GNU Emacs, GNU Bison, and other programs.

But you can point to any file. Here's an example: I started with a
fresh install of FreeDOS 1.3 (plain DOS .. and installed the "DJGPP"
package and the various I16GCC packages). The IA-16 GCC is installed
in C:\DEVEL\I16GNU, and the bin directory is C:\DEVEL\I16GNU\BIN

I set up a new directory called C:\SRC that contains this:

C:\SRC>dir /b
DJGPP.ENV
HELLO.C


The "HELLO.C" source file is just a dummy "Hello world" program:

C:\SRC>type hello.c
#include <stdio.h>
int main()
{
 puts("Hello world");
 return 0;
}


As I mentioned, the DJGPP stuff needs to look in the DJGPP.ENV file
for default settings. The file minimally needs to have DJDIR defined.
But in the case of IA-16 GCC, this is safe to leave empty because
IA-16 GCC is its own compiler. So my DJGPP.ENV file is basically
empty:

C:\SRC>type DJGPP.ENV
DJDIR=


But I can compile just fine:


C:\SRC>path C:\freedos\bin;C:\devel\i16gnu\bin
C:\SRC>set DJGPP=C:\src\DJGPP.ENV
C:\SRC>i16gcc -Wall -o hello.exe hello.c
C:\SRC>hello.exe
Hello world


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to