Re: [Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404 (fixed!)

2024-04-10 Thread Jim Hall via Freedos-devel
On Wed, Apr 10, 2024 at 10:20 AM Jim Hall  wrote:
> 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. [..] my DJGPP.ENV file is basically
> empty:
>
> C:\SRC>type DJGPP.ENV
> DJDIR=
>
>
> But I can compile just fine:
[..]


And a further demo:

When I installed FreeDOS T2404, I installed the I16GCC packages, but
obviously T2404 doesn't include the DJGPP stuff. So can you compile
programs using IA-16 GCC on T2404 without DJGPP? Yes! Just do what I
did. Here's my demo:


My C:\DEVEL directory contains just OpenWatcom C and IA-16 GCC. I
added the T.ENV file (because you can call the DJGPP env file
anything) and the ARGS.C file is just a dummy program I wrote as a
demo:

C:\DEVEL>dir /b
I16GNU
WATCOMC
ARGS.C
T.ENV

C:\DEVEL>type t.env
DJDIR=

C:\DEVEL>type args.c
#include 
int main(int argc, char **argv)
{
 int i;
 for (i = 0; i < argc; i++) {
  puts(argv[i]);
 }
 return 0;
}


And now compile it by setting the DJGPP variable to point to the
(empty) T.ENV file, then run IA-16 GCC as usual:

C:\DEVEL>set DJGPP=C:\DEVEL\T.ENV
C:\DEVEL>path C:\freedos\bin;C:\devel\i16gnu\bin
C:\DEVEL>i16gcc -Wall -o args.exe args.c
C:\DEVEL>args.exe this is a test 1 2 3 4 5
C:\DEVEL\ARGS.EXE
this
is
a
test
1
2
3
4
5


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


Re: [Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404 (fixed!)

2024-04-10 Thread Jim Hall via Freedos-devel
On Tue, Apr 9, 2024 at 5:46 PM Paul Dufresne via Freedos-devel
 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 
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


Re: [Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404 (fixed!)

2024-04-09 Thread Paul Dufresne via Freedos-devel
But installing I16BUTIIL,

SET DJDIR=C:\DEVEL\I16GNU

i16gcc -o hel2.exe hel2.c

works!



Even printf works now! (only if I16NEWLI is installed)



So in summary, needs I16BUTIl,I16GCC,I16NEWLI (I also have I16GCDOC),

and SET DJDIR=C:\DEVEL\I16GNU

to compile a program with:

i16gcc -o prog.exe prog.c



Thanks... hope it was not too much noise!___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404

2024-04-09 Thread Paul Dufresne via Freedos-devel
In fact,

SET DJDIR=C:\DONTEXIST

does the same...



SET DJDIR=

i16gcc hel2.c

result in error message environment variable DJGPP is not defined



since first message I have added I16NEWLI package... but it did not seems to 
provide stdio.h like I expected.___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404

2024-04-09 Thread Paul Dufresne via Freedos-devel
It does help, but just a little:



C:\HELLO>SET DJDIR=C:\DEVEL\I16GNU

C:\HELLO>type hel2.c

int main()

{

    return 5;

}

C:\HELLO>i16gcc hel2.c

Exiting due signal SIGSEGV

Page fault at eip=000b0d74 error=0004

...

program=C:\DEVEL\I16GNU\BIN\I16GCC.EXE

...



I have tried to give 128Mb rather than 32 Mb to QEMU machine , but seems to be 
same result.___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404

2024-04-09 Thread Kirn Gill via Freedos-devel
> Doing "set DJDIR=c:\devel\djgpp" I get stdio.h not found when compiling
hello world.

Cargo cult programming is your crime. You copied and pasted the example as
if it's some magic incantation. It's not. You're supposed to replace the
path given so that %DJDIR% points to the base of your gcc-ia16
installation.

I can't tell you where it's installed on your system - you are supposed to
be keeping up with that yourself. Remember: This is DOS, not Windows,
Linux, etc.; the work is up to YOU!

--
Kirn Gill II
Mobile: +1 813-300-2330 <+18133002330>
VoIP: +1 813-704-0420 <+18137040420>
Email: segin2...@gmail.com
LinkedIn: http://www.linkedin.com/pub/kirn-gill/32/49a/9a6


On Tue, Apr 9, 2024 at 12:02 PM Paul Dufresne via Freedos-devel <
freedos-devel@lists.sourceforge.net> wrote:

> I tried to install I16GCC from bonus CD of FDT2404.
> When I tried to compile a program it says I need to set DJGPP environment
> variable.
> https://gitlab.com/tkchia/build-ia16/-/releases says:
>
> "If you get the error message i16gcc.exe: fatal error: environment
> variable DJGPP not defined when running i16gcc.exe, you can do one of the
> following:
>
> Install the DJGPP base environment first, and then set the DJGPP DOS
> variable to point to its djgpp.env, e.g. set
> DJGPP=c:\devel\djgpp\djgpp.env. (See DJGPP's readme.1st for more
> information.)
> Alternatively, if you do not wish to install DJGPP, just set a DJDIR
> environment variable thus: set DJDIR=c:\devel\djgpp."
>
> Doing "set DJDIR=c:\devel\djgpp" I get stdio.h not found when compiling
> hello world.
>
> And it seems DJGPP is not on FDT2404-BNS.ZIP.
>
> On 1.3, DJGPP programs are listed:
>
> http://ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.3/official/report.html
>
> But not at all in:
>
> http://ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/report.html
>
> What I need to have i16gcc working in FDT2404?
>
> Is DJGPP supposed to be in FDT24040?
>
>
>
>
>
>
>
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] I16GCC would need DJGPP, but DJGPP not present in FDT2404

2024-04-09 Thread Paul Dufresne via Freedos-devel
I tried to install I16GCC from bonus CD of FDT2404.
When I tried to compile a program it says I need to set DJGPP environment 
variable.
https://gitlab.com/tkchia/build-ia16/-/releases says:

"If you get the error message i16gcc.exe: fatal error: environment variable 
DJGPP not defined when running i16gcc.exe, you can do one of the following:

Install the DJGPP base environment first, and then set the DJGPP DOS variable 
to point to its djgpp.env, e.g. set DJGPP=c:\devel\djgpp\djgpp.env. (See 
DJGPP's readme.1st for more information.)
Alternatively, if you do not wish to install DJGPP, just set a DJDIR 
environment variable thus: set DJDIR=c:\devel\djgpp."

Doing "set DJDIR=c:\devel\djgpp" I get stdio.h not found when compiling hello 
world.

And it seems DJGPP is not on FDT2404-BNS.ZIP.

On 1.3, DJGPP programs are listed:
http://ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.3/official/report.html

But not at all in:
http://ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/report.html

What I need to have i16gcc working in FDT2404?

Is DJGPP supposed to be in FDT24040?







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