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

creating a DLL

John_Campbell
New Contributor II
409 Views

I am trying to create a DLL from .f90 code using ifort XE 2011 IA-32.
I initially tried to create a .obj file and link it with other .obj files, using another linker but that did not work. The other linker did not import any of the routines in the ifort.obj file.
My aim is to compile the code with ifort and generate .lib and .dll files which can be bound into a project using another compiler.
Is this possible?
My attempt was : ifort /free /dll /Tf ifort_lib.f90

Also, how do I manage the different calling conventions ?

John

0 Kudos
1 Reply
Igor_V_Intel
Moderator
409 Views

Yes, you can generate a dll and use it in a different project. Use a dll option to specify that a program should be linked as a dynamic-link library. You can also find a useful presentation on how to do it from VS, just google for the "How to create Fortran DLL in Visual Studio with Intel Fortran compiler".

Note that there are several ways to adjust calling and naming conventions, e.g. use an ATTRIBUTES directive or iface compiler option.

0 Kudos
Reply