Topic: Unable to build a program.

When I try to build my first program, Windows 7 does not recognize the long file name generated by Simply Fortran.  See below for the example:

"C:\Program Files (x86)\Simply Fortran\mingw\bin\gfortran.exe" -o Project.exe  -static -L"C:/Program Files (x86)/Simply Fortran/mingw/lib/" -L"C:/Program Files (x86)/Simply Fortran/mingw/lib/w32api/"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Re: Unable to build a program.

I realize I answered this same way via email, but I'll respond here as well to assist others.

Which version of Simply Fortran are you currently working with?  This problem was common on 64-bit Windows in earlier versions, and could be solved by installing to a directory that was not the default (for example, C:\SimplyFortran).  I was unaware of issues with paths in the current version, 1.12.  If you currently have an older version, your problem might be solved by downloading the latest version from http://simplyfortran.com/download/.  If you're currently working with this latest version, let me know, and we can try some other things.

Jeff Armstrong
Approximatrix, LLC

Re: Unable to build a program.

I installed the new version 1.13. My program was: PRINT *, 'Hello'       STOP      END
When I select build, I get this message: ""C:\Program Files (x86)\Simply Fortran\mingw\bin\gfortran.exe"" -o Project.exe -static -LC:/PROGRA~2/SIMPLY~1/mingw/lib/
gfortran.exe: no input files; unwilling to write output files
Error(E42): Last command making (Project.exe) returned a bad status
Error(E02): Make execution terminated

I am using Windows 7 64-bit. I typed my program statements directly into the Simply Fortran editor. From the above message, it appears that gfortran.exe thinks there are no input files.

Re: Unable to build a program.

There are a few possibilities to correct this.  First, did you save the file?  If so, make sure it has been added to the project.  It should appear in the project panel on the left side of the screen.  To add the file in the editor, you can right-click on the editor tab at the top of the screen and select "Add Current to Project," which should place the file into the project tree. 

If your file is currently part of the project and you continue to receive this error message, open the project options dialog by selecting "Project..." from the Options menu.  Make sure that "Always Regenerate Makefile" is checked.  This option forces Simply Fortran to regenerate the makefile every time a build is requested. 

One last thing to check is that the file you created has a recognized extension.  Simply Fortran recognizes most common Fortran extensions.  I would suggest making sure it is either "file.f" or "file.f90."

Hopefully one of these solutions works for you.  If you're still having trouble, please post again and we'll sort the issue out.

Jeff Armstrong
Approximatrix, LLC

Jeff Armstrong
Approximatrix, LLC

Re: Unable to build a program.

I downloaded the latest version (1.16), I saved the file, I added it to the project, I installed the program to a directory that not was the default, and also I checked the option: always regenerate makefile; and I have the same problem that mike. Please help me!

Re: Unable to build a program.

If you wouldn't mind, could you post the Makefile to the forum or email it to support@approximatrix.com?  To view the Makefile, right click on the project tree and select "View Makefile..."

I'm not exactly sure what you mean by "installed the program to a directory that not was the default," but, hopefully, the issue is minor.  Any additional details might also help.  For example, what was the filename of the file you added to the project?  Where did you save the project file?

Jeff Armstrong
Approximatrix, LLC

Re: Unable to build a program.

In case this helps, all of the following works very well for me:

I have installed Simply Fortran in:
C:\Program files (x86)\Fortran\Simply Fortran 
(I also have other Fortran compilers in there)

My two current projects are called 'ioLib' and 'InStruct'
They are located in:
c:\Users\JWasilewski\Documents\Dev\Fortran\GNU\ioLIB
c:\Users\JWasilewski\Documents\Dev\Fortran\GNU\InStruct

To shorten the pathnamse, I use a neat Widows utility called "Visual Subst" (freely downloadable) to map two virtual drives as
"F:\"  mapped to C:\Program files (x86)\Fortran\Simply Fortran
"G:\" mapped to c:\Users\JWasilewski\Documents\Dev\Fortran\GNU\

In Simply Fortran I right-clicked on 'Project' then selected "Add file(s)..", and added all my source files.

Everything works perfectly.

I hope Mr/Miss "sugarbr0wn" manages to get it going.
It is such an uncomfortable feeling writing a message to someone who won't say who he or she is.
---
John