Software Archive
Read-only legacy content
17061 Discussions

Exposing multiple subroutines in a DLL

Intel_C_Intel
Employee
436 Views
I am writing Fortran DLL's that I am calling from Visual Basic. I am currently creating a separate project workspace for each subroutine. I expose the subroutines using:

!DEC$ ATTRIBUTES DLLEXPORT, ALIAS : "DoStuff"::DoStuff.

I would like to have several subroutines (DoStuff1, DoStuff2, ...) within the same project workspace but I don't know 1) if it is possible or 2) how or where to to write DLLEXPORT lines. Can anyone advise me? Thanks.

John
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
436 Views
Yes, it's certainly possible -- just add subroutine files to dll project. As for DLLEXPORT, I think they work anywhere in the source file where routine is defined -- however I always put DLLEXPORT immediately after FUNCTION/SUBROUTINE statement.
0 Kudos
Reply