Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28457 Discussions

dllimport directive to remove the underscore prefix

jpharvey1981
Beginner
336 Views

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
andrew_4619
Honored Contributor II
336 Views

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

0 Kudos
Reply