Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

Calling a DLL from a Fortran program

Intel_C_Intel
Employee
598 Views

Hi all,

I would like to call a subroutine storedin a DLL file from a fortran code, running under Linux. I have no idea on how to do that.

Could someoneplease write a small example that I can use?

Best Regards,

Paolo

0 Kudos
3 Replies
Steven_L_Intel1
Employee
598 Views
It is simpler on Linux than on Windows. On Linux, "shared objects" (.so) are the equivalent of DLLs and you do not need special directives. Other than the creation of the .so files, you treat them as normal libraries. For details, see the Intel compiler documentation under Building Applications..Creating and Using Libraries..Creating Libraries.
0 Kudos
strufolino
Beginner
598 Views

Thanks for the reply, but the solution is not so clear to me....

I don't have to create a shared object as I already have a DLL that I need to plug into my fortran code.

I need to call a subroutine contained in the DLL from my fortran code, and I

don't know how to do that....

Best Regards,

Paolo

0 Kudos
Steven_L_Intel1
Employee
598 Views
Are you using Linux or Windows? A Windows DLL cannot be used on Linux.
0 Kudos
Reply