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

DLL without dllexport or dllimport?

sgongola
Beginner
391 Views
We use the same code on different platforms. In VMS and
AIX, we can make shared libraries without having to
customize the code for the platform. Is there a way
to compile CVF code to make a dll without having to insert
directives with dllexport, dllimport or interface information into the fortran code?

thank you
sol gongola
0 Kudos
1 Reply
Steven_L_Intel1
Employee
391 Views
In general, yes.

For routines, you don't need DLLIMPORT (it's a performance optimization). You do need this for imported variables - no way around it.

For creating a DLL, you can supply a .DEF file to the linker - this names the entry points you want exported. See the on-disk documentation for more info on .DEF files. It's just a text file that you add to your project - it will get seen by the linker automatically. Again, though, if you're exporting variables, you must use DLLEXPORT.

However, there's no external way to force matches in routine naming or argument passing conventions, unless one of the compiler switches will suffice.

Steve
0 Kudos
Reply