Topic: Link-only?

A problem happening a lot for me:

My Fortran application project ('P', say) uses, inter alia, a custom-made library (say, 'L').

Whilst developing (P), I find a need to edit one of the routines in (L).
I therefore switch to (L), edit the required routine, re-build (L), and switch back to (P).

I have made no changes to (P) so when I rebuild (P), nothing gets re-compiled.
When re-building (P), I can't tell from the information appearing in the Build Status whether the libraries are all re-seached and re-linked.  Jeff, are they, and can this be made clearer?

Given that (P) has no way of knowing that t(L) has changed, I have been assuming that the libraries are not re-linked in these circumstances.  I therefore need to force them to re-link.  The only way I can find to do this is to CLEAN (P) and then re-build (P).  This, however, takes ages in a big project, because of the time it takes to re-compile (needlessly) all the routines of (P).  Is there a way to force a re-build to re-link all libraries?
---
John

Re: Link-only?

John,

One way to get around this problem right now would be to delete the target program (P) manually.  Simply deleting it will cause the linking step to be executed when a build is requested.  I'm not sure it would make sense to add a "Link" option to the build menu as it seems a bit much. 

If you don't allow Simply Fortran to automatically rebuild your makefiles, you could also add a dependency manually to the final linking step.  For example, if you want to force linking to occur every time a library (let's call it 'extra.a') changes, you could change the makefile linking line from:

Project.exe:  ..\cfm6\build\cfm6.o ..\cfm6\build\qck6.o ..\cfm6\build\sup6.o

to

Project.exe:  ..\cfm6\build\cfm6.o ..\cfm6\build\qck6.o ..\cfm6\build\sup6.o ..\..\lib\extra.a

Now linking Project.exe will occur whenever extra.a changes.  I know it's not ideal, but it is a solution.

Simply Fortran will add libraries to the dependency lists if the library is included in the project tree.  This method can sometimes lead to link errors as library order may be important.  However, if a library is in the project tree, Simply Fortran's link step dependencies should reflect this.

Jeff Armstrong
Approximatrix, LLC

Re: Link-only?

SPAM DELETED

4 (edited by JohnWasilewski 2012-06-04 14:58:41)

Re: Link-only?

SOD OFF SPAMMER 'ASHIS'.
Nobody wants you here. 
Nobody here will click your link.
GET STUFFED.