creating a DLL

creating a DLL

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 ?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today