compiler-errorsfortranide

Cannot execute wfc386 no such file or directory - Watcom Fortran IDE


I've been given a legacy fortan IV program that I need to compile for a legacy programming languages class and I've been instructed to use the Watcom IDE from http://www.openwatcom.org/index.php/Downloads.

My steps are as follows:

  1. Install the IDE to C:\Program Files\Watcom Fortan Compiler
  2. Create a new Project at C:\sampleProject.wpj
  3. Select Win32 (NT/95/Win32s) target environment
  4. Select Windows Executable (.exe) for Image type
  5. Select 'New Source' under 'Sources' menu
  6. Locate and successfully add C:\hilbert.for file to the project
  7. Select 'Make all' from the main menu bar

My build environment:

  1. Windows 7 x64 SP 1
  2. Intel Core i7-3720QM @ 2.6GHz
  3. 16GB RAM

Results:

cd C:\ - "Can't find a filename in 'cd C:\'"
wmake -f C:\sampleProject.mk -h -e - "Can't find a filename in 'wmake -f C:\sampleProject.mk -h -e'"
wfc386 \hilbert.for -d2 -q -dep - "Can't find a filename in wfc386 \hilbert.for -d2 -q -dep'"
Error(E14): Cannot execute (wfc386): No such file or directory
Error(E42): Last command making (C:\hilbert.obj) returned a bad status
Error(E02): Make execution terminated
Execution complete

Solution

  • I've run into three problems so far.

    1. I initially downloaded the wrong IDE. If you can't find the wfc386 file then you likely didn't download the right version. I had downloaded the C/C++ compiler by mistake.
    2. Installing to a path with spaces in it is unsupported. Hooray for old software.
    3. Storing the project to a path with spaces in it is unsupported. Hooray again for old software.

    The solution:

    1. Move your install to C:\Watcom
    2. Move your projects to something like C:\Projects or C:\Watcom\Projects
    3. Update ALL your local environment variables from their old values to the new correct path based on where you moved your Watcom installation