Topic: Getting Started - Build Errors

Ok need a little help with getting started over the hump. Come from the ancient F77 world of compiling via batch file and linking via batch files etc, the code is ok, appeared to be have created static lib.o ok (well I think so anyway?) and now simply trying to build a simple (ancient) test routine that I know works but getting some sort of linker input error which I'm not all that sure about?

Error (F38) & (02) I understand as obviously no object file has been compiled due to the link error.

What is the "gfortran.exe: warning: ...." line trying to tell me?

==============================================================================
Generating Makefile... Okay
==============================================================================
Compiling TCHAR.F77
gfortran.exe: warning: TCHAR.F77: linker input file unused because linking not done
Error(F38): (build\TCHAR.o) does not exist and cannot be made from existing files
Error(E02): Make execution terminated

* Failed *

2 (edited by davidb 2014-01-04 10:32:38)

Re: Getting Started - Build Errors

This warning usually occurs when you use option "-c" in the link step by mistake.

That is, if you do something like.

gfortran -c main.f90
gfortran -c procs.f90
gfortran -c -o main main.o procs.o

Adding the -c to the link step means the object files are not passed to the linker (ld) and the warning is generated.

Look at your makefile and what's in variable PRJ_LFLAGS. Have you added "-c" to your link options somehow (perhaps in Options>Project)?

--
David

Re: Getting Started - Build Errors

Ok I have managed to get around this warning by changing the .f77 extension to .for and now get basically a clean compile (no warnings for this section anyway) so that's some progress.

I do have other issues but will look further at these and if all else fails then I'll be back. Thankyou.

Re: Getting Started - Build Errors

Matt,

The uppercase extensions instruct Simply Fortran's compiler to pass the Fortran files through the C preprocessor prior to compiling.  It leads to some odd errors if the behavior is not intended. 

Whenever you have a question, feel free to post it.

Jeff Armstrong
Approximatrix, LLC