Topic: New SF User - Can't Even Get "Hello World" to Work !!

Hi,

Sorry to be so dumb, but I have downloaded and installed the SF software and kind of read all the documentation that comes with it, but I still can't get a one-line "Hello World!" program to compile sucessfully.

The Build Status comes back as:

Generating Makefile... Okay
==============================================================================
Compiling TestFile.f08

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Error(E42): Last command making (build\TestFile.o) returned a bad status
Error(E02): Make execution terminated

* Failed *

The contents of the makefile are:

#
# Automagically generated by Approximatrix Simply Fortran 2.14
#
FC="C:\Program Files\Simply Fortran 2\mingw-w64\bin\gfortran.exe"
CC="C:\Program Files\Simply Fortran 2\mingw-w64\bin\gcc.exe"
AR="C:\Program Files\Simply Fortran 2\mingw-w64\bin\ar.exe"
WRC="C:\PROGRA~1\SIMPLY~1\MINGW-~1\bin\windres.exe"
RM=rm -f

IDIR=
# -I error: Directory C:\Program Files\Simply Fortran 2\mingw-w64\include\ does not exist
# -I error: Directory C:\Documents and Settings\Administrator\Local Settings\Application Data\\sfpm\32\include does not exist

LDIR=-L"C:/Program Files/Simply Fortran 2/mingw-w64/lib/"
# -L error: Directory C:\Documents and Settings\Administrator\Local Settings\Application Data\\sfpm\32\lib does not exist

OPTFLAGS= -g

SPECIALFLAGS=-m32 $(IDIR)

RCFLAGS=-O coff -F pe-i386

PRJ_FFLAGS=

PRJ_CFLAGS=

PRJ_LFLAGS=

FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules

CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)

"build\TestFile.o": "TestFile.f08"
    @echo Compiling TestFile.f08
    @$(FC) -c -o "build\TestFile.o" $(FFLAGS) "TestFile.f08"

clean: .SYMBOLIC
    @echo Deleting build\TestFile.o and related files
    @$(RM) "build\TestFile.o"
    @echo Deleting TestTarget.exe
    @$(RM) "TestTarget.exe"

"TestTarget.exe":  "build\TestFile.o"
    @echo Generating TestTarget.exe
    @$(FC) -o "TestTarget.exe" -static -m32 "build\TestFile.o" $(LDIR) $(PRJ_LFLAGS)

all: "TestTarget.exe" .SYMBOLIC

Would really, really appreciate it if someone out there is able to point out to me what I am doing wrong ?

Thanks

Lionel

Re: New SF User - Can't Even Get "Hello World" to Work !!

Lionel,

It looks like you may have encountered a compiler bug.  I don't think you're doing anything wrong.  Could you also provide the contents of "TestFile.f08?"

Jeff Armstrong
Approximatrix, LLC

Re: New SF User - Can't Even Get "Hello World" to Work !!

Lionel,

After a bit of research, it sounds like there could possibly be a permissions issue related to your temporary files directory or the directory where you've saved your project.  One option to fix this might  be to add the following to Fortran and Linker flags under the Compiler Flags tab in Project Options:

-pipe

The above should force Simply Fortran's compiler to use pipes rather than temporary files, which may fix your issue.

Jeff Armstrong
Approximatrix, LLC

Re: New SF User - Can't Even Get "Hello World" to Work !!

Jeff,

Many thanks for your quick reply.  I have fixed the problem but not exactly sure what did the fix:
(1) Java was completely missing from my PC (I have no idea what caused it to disappear) and so I reinstalled it (actually had to use the offline version because it wouldn't let me download it in the usual way);
(2) Prior to downloading SF, I had installed MinGW by itself and changed the ENVIRONMENT variables when I did this (I added a PATH variable and set it to "C:\MinGW\bin" and stupidly added ";C:\MinGW\bin" to the end of both the TEMP and TMP variables that were already there) but when I uninstalled MinGW I hadn't changed the ENVIRONMENT variables back to what they were beforehand, so I did this; and
(3) I uninstalled SF, downloaded it again and reinstalled it and didn't try to change any of the options before I tried to build my simple TestFile.f08.

Anyway, all is well now.  Lets hope that I am better at actually writing Fortran code than installing software !!

Thanks again.

Lionel

Re: New SF User - Can't Even Get "Hello World" to Work !!

Lionel,

The issue was almost certainly due to the values for your TEMP and TMP environment variables.  Simply Fortran's compiler uses these values, if available, to store temporary files while compiling.  Java's presence or lack thereof would not affect Simply Fortran's operation.   If you do have any other issues, please let us know!

Jeff Armstrong
Approximatrix, LLC