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 

Creating dlls

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 91

PostPosted: Tue May 02, 2017 10:05 am    Post subject: Creating dlls Reply with quote

I am trying to create a dll using slink64. As known from slink (32 bit) I tried to use
Code:
dll
as the first command for slink64 to specify that a DLL was to be built. However, slink64 complains displaying "***dll - unknown command."
Command "archive" is unkwown to slink64, as well.

How would I create a dll and an archive for the 64 bit environment?

Regards,
Dietmar
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 673

PostPosted: Tue May 02, 2017 11:12 am    Post subject: Reply with quote

If the source code for your DLL already has the relevant !FTN95 DLLEXPORT directives, you can link the DLL exactly as you would an EXE. The linker will output an EXE or DLL, as the case may be, based on the file extension in the /out:<filename> argument.

To link a program that calls the DLL, simply specify the DLL name with the extension in the SLINK command. You do not need a stub static library in the way that the MS build system, which is used by other Fortran compilers on Windows, does.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue May 02, 2017 11:46 am    Post subject: Reply with quote

The SLINK64 default is to export all routines regardless.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1484
Location: South Pole, Antarctica

PostPosted: Wed May 03, 2017 5:52 am    Post subject: Reply with quote

Respect to compiler directives !FTN95$OPTIONS(directive).
Specifically directives FREE and FIXED

Is it considered as a big crime against Standard to mix free and fixed format source code in the same file using such directives?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed May 03, 2017 7:27 am    Post subject: Reply with quote

Have you tried it? I don't think that it can be done using FTN95.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 503

PostPosted: Thu May 04, 2017 11:11 pm    Post subject: Reply with quote

you learn something new on this forum everyday, which is certainly one of it's strong points.

To answer Dan, according to here ....
http://silverfrost.com/ftn95-help/directiv/comment_embedded_directives.aspx
the 'embedded in comment' method conforms to F90 standard
and so it should by definition work !

However the restriction appears to be as documented here ....
http://silverfrost.com/ftn95-help/directiv/the_options_directive.aspx
where it says ...
Quote:
An OPTIONS directive can only appear before the first program unit, or between program units, in a source file"

which just means organising the code into F77 or F95 'modules' or 'Functions/Subroutines' doesn't it.
Which is logical as no one would want to switch options every few lines now would they ?
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 -> 64-bit 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