replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - compiling modules as separate files
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 

compiling modules as separate files

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



Joined: 19 Sep 2011
Posts: 4

PostPosted: Fri Oct 07, 2011 3:37 pm    Post subject: compiling modules as separate files Reply with quote

Hi,i usually compile everything in the ftn95 comand prompt with:
ftn95 filename/lgo
however now i want to put a subroutine in the module and the module in the separate file.
there are no errors but compilation is abandoned,i have to link somehow these 2 files together,what should i do?thanks
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Fri Oct 07, 2011 4:47 pm    Post subject: Reply with quote

You have to compile one file at a time (in the correct dependency order) then use SLINK to do the link (order of object files doesn't matter).

ftn95 module_file.f90
ftn95 program_file.f90
slink -out:program.exe module_file.obj program_file.obj

This generalises for more than 2 files in the obvious way.

This isn't documented very well in the Help file. There is no discussion about SLINK. If you type SLINK -help you will get a list of options.

Things are a little different if you are building for .NET as you need a different linker.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
umike



Joined: 19 Sep 2011
Posts: 4

PostPosted: Fri Oct 07, 2011 5:11 pm    Post subject: Reply with quote

that has really worked out,thanks alot

help is sometimes difficult to understand,luckily there is support
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Oct 07, 2011 6:12 pm    Post subject: Reply with quote

Many users find it easier to create a project using Plato or Visual Studio.
Back to top
View user's profile Send private message AIM Address
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