View previous topic :: View next topic |
Author |
Message |
TPSchultz
Joined: 30 Dec 2009 Posts: 9 Location: Los Angeles, USA
|
Posted: Thu Dec 31, 2009 8:32 pm Post subject: DLL Exports |
|
|
I've built a Win32 DLL that contains several internal subroutines and functions, and everything appears to be working fine. In the Linker options, I've answered "Yes" to "Export All".
My question deals with how to export (make visible) only one or two of the subroutines. When I answer "No" to "Export All", I don't see a way to specify individual subroutine or function names in the Linker options. How do I do this? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Jan 01, 2010 9:13 am Post subject: |
|
|
The form of the SLINK commmand line command for exporting a particular routine is
-export:entryname
where entryname is the name of the routine (uppercase). Each item in the list can be separated by a space.
Try
-export:entryname1 -export:entryname2
You could also see if the following works
-export:entryname1,entryname2
For details see the FTN95 help file under Win32 Platform->Using the linker->Reference->Command line mode.
In Plato and Visual Studio this list can be inserted in the Project Properties under Linker Options then Extra linker options.
If you have any problems then use SLINK from a command line first and then adapt the result to Plato or Visual Studio.
As a future development we could introduce a comment embedded directive into the Fortran code so that the IDE could do this automatically for you. |
|
Back to top |
|
 |
TPSchultz
Joined: 30 Dec 2009 Posts: 9 Location: Los Angeles, USA
|
Posted: Fri Jan 01, 2010 8:26 pm Post subject: |
|
|
Entering this in the Extra Linker Options (in Visual Studio) is exactly what I was looking for, and had tried, but I had the syntax wrong. I didn't realize that I had to put a dash ("-") in front of the word export, and I didn't realize I couldn't simply make a list of exports separated by commas. So the syntax of: "-export:entryname1 -export:entryname2" worked pefectly.
Thank you, and Happy New Year! |
|
Back to top |
|
 |
|