Topic: Makefile query

I'm having trouble with my project and one of my own separately compiled and built libraries.
I can't get the Simply Fortran to find and load the routines needed from the library at link time.

Here is a very small fragment of my build report:

==============================================================================
Open Watcom Make Version 1.9 (Built on May 17 2012)
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
    "C:\Program Files (x86)\FORTRAN\SF\mingw-w64\bin\gfortran.exe" -o InStruct120(64bit).exe -static -mwindows build\mParams.o build\mProps.o build\mWinSTUFF.o build\InStruct.o build\WinMenus.o build\alloc1.o build\rMatls.o build\rProps.o build\rParams.o build\List.o build\rTitles.o build\mNODES.o build\rNodes.o build\WinSCR.o build\rMembs.o build\mMEMBS.o build\mRestr.o build\rRestr.o build\mMatls.o build\utility.o build\WinINIT.o build\GetRESTR.o build\BailOut.o build\mLoading.o build\rLoads.o build\alloc2.o build\ReadPARAMS.o build\ReadMATLS.o build\ReadPROPS.o build\Alloc2Plus.o build\SaveLOADS.o build\ReadLOADS.o build\mDRW.o build\ParsePath.o build\mCONFIG.o build\mTITLES.o build\mFiles.o build\FileHandler.o build\mLUNITS.o build\RWInput.o build\ClearAllData.o build\mRTF.o build\DrawRTF.o build\DrawSCR.o build\Struct.o build\rcode.o build\skydia.o build\alloc3.o build\mM.o build\stiff.o build\lodvec.o build\execut.o build\memstf.o build\addmem.o build\addspr.o build\getmem.o build\Decifr.o build\Divide.o build\LoadTypN.o build\solve.o build\output.o build\force.o build\Spreac.o build\dotty.o build\sterm.o build\rotate.o build\ReadRESTR.o build\addlod.o build\ReadNODES.o build\ReadMEMBS.o build\ReadSPRI.o build\LoadTypS.o build\LoadTypP.o build\LoadTypU.o build\MemRel.o ..\LIBS\disgf.a ..\LIBS\dismg.a -LC:/PROGRA~2/FORTRAN/SF/MINGW-~1/lib/ -LG:/InStruct120/../LIBS -luser32 -lgdi32 -lopengl32
build\InStruct.o: In function `instruct':
G:\InStruct120/./Source/InStruct.for:242: undefined reference to `undlin_'
G:\InStruct120/./Source/InStruct.for:243: undefined reference to `lf_'
G:\InStruct120/./Source/InStruct.for:246: undefined reference to `banner_'
G:\InStruct120/./Source/InStruct.for:248: undefined reference to `datetoday_'
build\WinMenus.o: In function `winmenus_':
G:\InStruct120/./Source/WinMenus.for:45: undefined reference to `rtfini_'
G:\InStruct120/./Source/WinMenus.for:210: undefined reference to `i2char_'
G:\InStruct120/./Source/WinMenus.for:211: undefined reference to `i2char_'
G:\InStruct120/./Source/WinMenus.for:329: undefined reference to `goodbye_'
build\rMatls.o: In function `stormatls_':
G:\InStruct120/./Source/rMatls.for:190: undefined reference to `i2char_'
G:\InStruct120/./Sourc...
...
... (there's loads more,,. but I've truncated it)
==============================================================================
All of the 'undefined references' are sitting there in the library, which is successfully built and accessible when trying to build my main project.

My library file is called iolib64.a

I have emailed a copy to Jeff of my project file, Instruct120(x64).prj in which one can see that I have successfully ADDED iolib64 to the project outline window.

What I have discovered, however, is that Simply Fortran seems to forget to add it to the makefile, which I have also emailed.
Rest assured, I do have the project option ticked for always regenerating the makefile.

Is there anything I might be doing incorrectly here?
Alternatively, might there be a small glitch in how the makefile is generated?
---
John

Re: Makefile query

PROGRESS REPORT on this
-------------------------------
Jeff looked at my .prj fie and makefie and spotted in less than a nanosecond a daft error I'd made by adding the library project file instead of the library itself to my mail project.  I'd made this embarassing mistake only in the example files I put together to send to Jeff so when I corrected it, the original problem was still there.
I continued to be unable to build my main project.  It continued to report missing code, even when it was loading the library containing it.

After a lot of experimenting, I discovered that one tiny change I had made might be the cause of the problem.
I had ticked the [Windows GUI (no console)] project option in both my iolib64.a library and my main InStruct120(64bit).exe main project.  I had done this because my main project has a Windows GUI (built using the truly excellent DISLIN), and I thought that, as the console has no relevance to a library (i.e. it will or will not already be opened when the main program calls any library routines), I might as well give the library project the same options settings as my main project.

When I unticked this box in the library and rebuilt it, leaving the same box ticked only in the main project, I was able again to re-build the latter free of all error messages.  This MIGHT just be a coincidence but I hadn't changed anything else when I got it to work.

I've emailed to  Jeff a further report with attached files and he is looking to see whether what I did was causative.  I've suggested that, if it was, and the [Windows GUI (no console)] option should not ever be ticked in static library projects, then an error trap in Simply Fortran to prevent people like me from breaking it like this might be worthwhile.
----
John