## New DOS Ver 1.00.0

DOS specific questions.
VinceMcc
Posts: 5
Joined: Jan 25, 2007 17:17
Location: Nipomo, Calif.
Contact:

### New DOS Ver 1.00.0

I installed the new FreeBASIC-1.00.0-DOS. Cannot compile simple program.

Keep getting error Msg F:\Fb_v1000\\lib\\dos\\i386go32: No such file or directory.
The file i386go32.x is in the directory \lib\dos. Cannot even compile programs I was able to compile on FreeBASIC-.0901. It still works but not the new version FreeBASIC-1.00.0-dos.
It will not even compile in Windows\Dos. I have been using Windows 98se in Windows XP as a dual operating system.
Is there something with the new FreeBASIC-1.00.0 dos program?

Thank you Vince McCarthy
vincemcc@att.net
dkl
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

### Re: New DOS Ver 1.00.0

Hello,

I haven't seen this error myself (yet), but then again I'm testing on a Windows XP (in a virtual machine)... no "real" DOS. It looks like an issue with backslashes in the path to the lib\dos\i386go32.x file.

Could you compile with the -R option (upper case R), for testing purposes? For example:
fbc foo.bas -R

This tells fbc to leave behind the temporary files it creates when compiling. I'd like to know the content of the text file "ldopt.tmp", which fbc uses to pass options to ld.exe (the linker). It should also contain the full path for lib\dos\i386go32.x which is used for linking.

It'd be interesting to know whether fbc is producing the expected path in the ldopt.tmp file, or whether it's already wrong there.

Between 0.90.1 and 1.00.0 I changed how fbc will emit the backslashes in ldopt.tmp. For 0.90.1 they were written as plain \, but for 1.00.0 they are escaped as \\. This fixed a bug (#701) and seemed to be allowed by ld documentation for @file, but maybe I've missed something. It could be related to quoting too...
Aaronm82
Posts: 25
Joined: Sep 19, 2014 23:29

### Re: New DOS Ver 1.00.0

New version isn't working for me either...

I got this error:

"ld: cannot open linker script file c:\\tools\\freeba~1.0-d\\lib\\dos\\i386go32.x :no such file or directory (ENOENT)"

I gave it the same argument I used for previous FBC Dos compiler, "fbc -lang qb gcs20a.bas"

^ the above argument worked fine to make .EXE using previous FBC DOS compiler version (0.90.1-dos)

My computer is a plain old, vintage, 14 year old Windows ME machine.
mycreator
Posts: 4
Joined: Sep 23, 2014 19:07

### Re: New DOS Ver 1.00.0

Where can I get new correct fbc.exe?
Thanks!
marcov
Posts: 3049
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

### Re: New DOS Ver 1.00.0

The output of "ld --verbose" might be helpful. Only the lines with paths in them.
mycreator
Posts: 4
Joined: Sep 23, 2014 19:07

### Re: New DOS Ver 1.00.0

who need
Git version fbc 1.01.0, compile on Win98 and DJGPP
FreeBASIC-1.01.0-dos.zip
I change code in /src/compiler/fbc.bas:

Code: Select all

`ln = hReplace( ln, \$"\", \$"\\" )`

to

Code: Select all

`ln = hReplace( ln, \$"\\", \$"\" )`

this helped fix error.

First, I compile git version using FreeBASIC-0.90.1-dos.
When I recompile freebasic using compiled git version, I get error "undefined reference fb_cpudetect".
I replace libfb.a from FreeBASIC-1.00.0-dos to compiled git version, and recompile.
Sorry for my English, not native language.
dkl
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

### Re: New DOS Ver 1.00.0

I've made a similar change in the meantime:
Don't escape backslashes when invoking ld on DOS

which basically just disables the \ -> \\ escaping on DOS because apparently it neither is needed nor works.
mycreator
Posts: 4
Joined: Sep 23, 2014 19:07

### Re: New DOS Ver 1.00.0

dkl wrote:I've made a similar change in the meantime:
Don't escape backslashes when invoking ld on DOS

which basically just disables the \ -> \\ escaping on DOS because apparently it neither is needed nor works.

ln = hReplace( ln, \$"\", \$"\\" ) — don't fix error
ln = hReplace( ln, \$"\\", \$"\" ) — fix error
maybe need change on git
dkl
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

### Re: New DOS Ver 1.00.0

I've simply removed the \ -> \\ escaping for DOS which seemed to have been the problem. I don't think we need the opposite \\ -> \, do we? I thought that the incoming paths are ok - the problem was just that they weren't written to the @ldopt.tmp file properly.
jamjamason
Posts: 20
Joined: Jul 17, 2012 18:51

### Re: New DOS Ver 1.00.0

It looks like the download links in the News forum post and on the Downloads page still point to version 1.00.0, which means I just downloaded the non-working version, installed it and spent some time fixing up my directory structure and copying source, etc., only to find this bug, search for it on the forums, find the link to the fixed zip file, download it again, etc.

Thanks,
Jerry
dkl
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

### Re: New DOS Ver 1.00.0

The new version 1.01 wasn't released yet; I'm planning to make the new release in December.

In the meantime, it's possible that you can find builds of the development version of FB (which contains the bug fix) from other sources, for example here.
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

### Re: New DOS Ver 1.00.0 - worx for me

> I installed the new FreeBASIC-1.00.0-DOS. Cannot compile simple program.

Worx for me in both FreeDOS and EDR-DOS. Was there a silent update or did it always work?

See shot:

("Hello World" raw COFF bloat is 86 KiO only with FBC 1.0 ...)
dkl
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

### Re: New DOS Ver 1.00.0

No, no silent update... weird though that it sometimes works, sometimes doesn't. I'm thinking that the \\ slashes and ld using those as-is is the problem, and it happens to work on systems which accept \\. So it seems like it works on Windows XP and FreeDOS, but not MS-DOS.
mycreator
Posts: 4
Joined: Sep 23, 2014 19:07

### Re: New DOS Ver 1.00.0

My build works in MS-DOS. viewtopic.php?p=200940#p200940
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

### Re: New DOS Ver 1.00.0

FBC 1.0 DOS works well, most notably, it removes the 70 KiO of extra bloat added in 0.90, and the "FBC.EXE" file itself is also much smaller than in 0.22, thanks to the devels :-) After replacing the "binutils" by those from 0.22 (actually just "AS.EXE" and "LD.EXE" are sufficient) it still works without any warns.

Win32