×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

f1042 error during compile

f1042 error during compile

f1042 error during compile

(OP)
I get an f1042 error during a compile running under Win7x64 with NTVDMx64 installed:

E:\DECBAL>FL /FPi /c /Fs DECBAL.FOR
Microsoft (R) FORTRAN Optimizing Compiler Version 4.00
Copyright (c) Microsoft Corp 1987. All rights reserved.

DECBAL.FOR
fatal error C1042: cannot open compiler intermediate file - no such file or directory

error 2001: Null pointer assignment
fatal error F1042: cannot open compiler intermediate file - no such file or directory

Any ideas?
Both MASM and LINK work, as well as binarys which have been compiled elsewhere and ported.

RE: f1042 error during compile

see here: https://www.pcjs.org/documents/books/mspl13/c/qcup...

CODE

C1042                             cannot open compiler intermediate file -
                                    no such file or directory

                                    The compiler could not create
                                    intermediate files for use in the
                                    compilation process because the TMP
                                    environment variable was set to an
                                    invalid directory or path. 

So check your environment variable TMP, maybe it was set to a nonexistent directory, or it was not set at all.

RE: f1042 error during compile

(OP)
TMP E:\FORTRAN and LIB E:\FORTRAN
were set in the Environment Variables.
Joe.

RE: f1042 error during compile

I found this version of Microsoft Fortran https://winworldpc.com/product/microsoft-fortran/4...
installed it on DOSBox and it seems to works for me.

I tried to compile a little HELLO.FOR program with the compiler options you provided and FL created HELLO.OBJ and HELLO.LST



I used this environment setting:

CODE

PATH C:\;C:\BIN
SET TMP=C:\TMP
SET LIB=C:\LIB 

RE: f1042 error during compile

(OP)
Thanks.
DOSBOX does not handle the parallel port. I can't use it for some of my programs, so I don't bother with it at all.
I will check out the link you gave.
Repeating: the Fortran 4.1 version that I have works perfectly under Windows 7x86, but does not work under Windows 7x64
I have checked out the link and downloaded Fortran 5.1 to try it. The files are in .img format show an error when I try to burn them to a CD using either IMGBURN or Windows burn. I no longer have floppy disc capability.
Joe.

RE: f1042 error during compile

As for DOSBox, maybe you can use DOSBox-X which is enhanced version of DOSBox and has support for printers - see: https://dosbox-x.com/wiki/Guide%3ASetting-up-print...

As for the IMG files you can rename them to ZIP and then extract.
For example for MS Fortran 5.1 which i downloaded from this link
https://winworldpc.com/product/microsoft-fortran/5...
i renamed the files disk1.img, .., disk6.img into disk1.zip, .., disk6.zip and then extracted them into directories disk1, .., disk6

CODE

C:\INSTALL\MSFOR51>dir

 Volume in drive C has no label
 Volume Serial Number is 0000-1234
 Directory of C:\INSTALL\MSFOR51

.              <DIR>            04/09/2023  4:14a
..             <DIR>            04/09/2023  4:16a
DISK1          <DIR>            04/09/2023  4:11a
DISK2          <DIR>            04/09/2023  4:12a
DISK3          <DIR>            04/09/2023  4:12a
DISK4          <DIR>            04/09/2023  4:13a
DISK5          <DIR>            04/09/2023  4:13a
DISK6          <DIR>            04/09/2023  4:14a
FORDOC   ZIP            272,246 12/15/2014 10:51p
WINWOR~1 TXT                691 12/15/2014  1:20a
    2 File(s)           272,937 Bytes
    8 Dir(s)           393.19 G Bytes free

C:\INSTALL\MSFOR51> 
Then I changed into C:\INSTALL\MSFOR51\DISK1 and started installation with SETUP.EXE.
During the installation all other necessary directories DISK2, .., DISK6 were found automatically.
After the installation the file with environment settings was created
C:\FORTRAN\BIN\NEW-VARS BAT

which contains proper environment settings:

CODE

SET PATH=C:\FORTRAN\BIN\;C:\FORTRAN\BINB\;Z:\;Z:\SYSTEM;Z:\BIN;Z:\DOS;Z:\4DOS;Z:\DEBUG;Z:\TEXTUTIL
SET LIB=C:\FORTRAN\LIB
SET INCLUDE=C:\FORTRAN\INCLUDE
SET HELPFILES=C:\FORTRAN\HELP\*.HLP
SET INIT=C:\FORTRAN\INIT
SET TMP=C:\FORTRAN\BINB 
It need be executed before running the FL compiler.

RE: f1042 error during compile

@joeyc100:
Did you manage to unpack the IMG files and install the MS Fortran compiler?

RE: f1042 error during compile

(OP)
DOSBOX X just allows for printer output. I need full access to the bidirectional parallel port for read/write data, write control, and read status/sense. I have found the windows driver Inpout.sys for /windows/system32/drivers and a c++ program to read/write lpt1 directly in windows7, so I will go that way.
But I still want to use 16 bit programs in 64bit windows, and want to see if Fortran 5.1 will work.
I don't know how to unpack the renamed .zip files. Windows will not do it, claiming the files are defective, and I don't know any MSDOS command.

RE: f1042 error during compile

(OP)
Never mind. I unpacked with 7-ZIP and installed Fortran 5.1.
I'll try it tomorrow.
Thanks for all your help.
Joe.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close