View previous topic :: View next topic |
Author |
Message |
silverdan
Joined: 14 May 2009 Posts: 29
|
Posted: Tue May 19, 2009 6:00 pm Post subject: How to build fortran 77 code with a .LIB and .FI includes? |
|
|
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? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed May 20, 2009 10:01 am Post subject: |
|
|
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. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Wed May 20, 2009 11:55 am Post subject: |
|
|
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 |
|
Back to top |
|
 |
silverdan
Joined: 14 May 2009 Posts: 29
|
Posted: Wed May 20, 2009 2:35 pm Post subject: |
|
|
Thanks I will try that |
|
Back to top |
|
 |
|