Silverfrost Forums

Welcome to our forums

How to build fortran 77 code with a .LIB and .FI includes?

19 May 2009 5:00 #4626

We have a huge fortran 77 code base and would like to build it with FTN95. Currently building with Microsoft Developer Studio PowerStation. Below is a rough estimate of what we have:

 couple hundred main .FOR programs
 a common library (.LIB) that has a couple hundred subroutines in it
 several hundred include files (.FI)

Each main program individually relies on subroutines in the .LIB and common variables in the .FI files

In FTN95, what is the best way to build the .LIB? As a DLL? How do I tell the project to use the .FI files as well?

20 May 2009 9:01 #4630

Most people would build a DLL but there is no reason why you should not use a LIB.

In Plato you do not need to add the INCLUDE files. Plato does this for you. In Visual Studio there is no need to add the INCLUDE files but you can add them to a project for ease of access.

You will need to configure Plato in order to get syntax colouring for *.fi files (see the Options dialog under Tools). You will probably have to do something similar if you are using Visual Studio.

20 May 2009 10:55 #4632

I have most of my code in .lib files and link as libraries into an executable. I have yet to be convinced of the advantage of .dll's, as they have some logistics problems. to make my library in a cmd.exe box, I have two files, as listed below:-

make.bat now >make.tce del *.obj >>make.tce ftn95 binin /optimise >>make.tce ftn95 binout /optimise >>make.tce ftn95 collapse /debug >>make.tce ... lines deleted ftn95 nearest /debug >>make.tce ftn95 testlu >>make.tce ftn95 echodll >>make.tce * del saplib.lib >>make.tce slink saplib.txt >>make.tce del *.obj >>make.tce

saplib.txt archive saplib.lib addobj binin.obj addobj binout.obj addobj collapse.obj ... lines deleted addobj nearest.obj addobj testlu.obj addobj echodll.obj file

This always works for me

20 May 2009 1:35 #4633

Thanks I will try that

Please login to reply.