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 

Common blocks in DLLs

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





PostPosted: Mon Aug 29, 2005 1:55 pm    Post subject: Common blocks in DLLs Reply with quote

Hello everybody,
almost the same question as Mr. Pannhorst:
How can in FTN95 Fortran executables share "COMMON" blocks with a DLL ? Is there any compiler/linker switch to allow that ?


Georg Duschl
Back to top
PaulLaidler
Site Admin


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

PostPosted: Wed Aug 31, 2005 4:07 am    Post subject: Common blocks in DLLs Reply with quote

At the moment FTN95 does not enable you to link a common block (or module data)
across a main program and a DLL or across two DLLs. If you use the Salford
intrinsic LOC to get the addresses you will find that the two sets of data
have different address spaces.

This limitation already appears on the wish list of things to do when time and resources permit.

What is needed is an EXTERNAL attribute that can be attached to a common block (or module data)
in a way that is analogous to subprograms. Incidentally, you can embed a common block in a
module so adding the feature for a common block alone may be sufficient.

A rather poor alternative is to put all the data into one array (using EQUIVALENCE statements
for the variables) and to pass this array on each call. Since the array is passed by reference,
the overhead is minimal. You could also put the relevant code in an INCLUDEd file.
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Wed Aug 31, 2005 6:47 am    Post subject: Common blocks in DLLs Reply with quote

Thank you Paul!
I hope, that your wish list is not too long and that you'll soon find time to inlcude this important feature.


Georg Duschl
Back to top
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