replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - How to build fortran 77 code with a .LIB and .FI includes?
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
silverdan



Joined: 14 May 2009
Posts: 29

PostPosted: Tue May 19, 2009 6:00 pm    Post subject: How to build fortran 77 code with a .LIB and .FI includes? Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Wed May 20, 2009 10:01 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Wed May 20, 2009 11:55 am    Post subject: Reply with quote

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
View user's profile Send private message
silverdan



Joined: 14 May 2009
Posts: 29

PostPosted: Wed May 20, 2009 2:35 pm    Post subject: Reply with quote

Thanks I will try that
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group