View previous topic :: View next topic |
Author |
Message |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Tue May 02, 2017 10:05 am Post subject: Creating dlls |
|
|
I am trying to create a dll using slink64. As known from slink (32 bit) I tried to use
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 |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1892
|
Posted: Tue May 02, 2017 11:12 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue May 02, 2017 11:46 am Post subject: |
|
|
The SLINK64 default is to export all routines regardless. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Wed May 03, 2017 5:52 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Wed May 03, 2017 7:27 am Post subject: |
|
|
Have you tried it? I don't think that it can be done using FTN95. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu May 04, 2017 11:11 pm Post subject: |
|
|
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 |
|
|
|