Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
19 Views

dllimport directive to remove the underscore prefix

Hi, 

I would like to import a subroutine defined in a dll I built in Delphi in my fortran code.

 

 

 

 

 

 

How can I tell the compiler that  I don't want the underscore prefix when using the dllimport command?

for now I have something like:

!dec$ attributes dllimport :: myfunc

and I specified in the visual studio environment that I am using standard calls and names in capital letters. However, the compiler always add an underscore prefix and throw an error upon linking because it cannot find the  _MYFUNC external symbol (the name of the subroutine is MYFUNC in the dll and associated lib file)

Sincerely,

0 Kudos
1 Reply
Highlighted
Valued Contributor III
19 Views

!DEC$ ATTRIBUTES DLLIMPORT, ALIAS: 'MYFUNC' :: MYFUNC

0 Kudos