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.

using IVF-built DLL in CVF

forall
Beginner
638 Views
I would like to use IVF to produce DLLs that are usable by my colleagues who still use CVF. Is this possible using project settings or !DEC directives such as ALIAS, etc? I am rather shaky on the naming conventions (is there a document that summarizes this somewhere? There are quite a few posts on this but their relation to each other is not always easy to follow).

I also noticed in practice (and by reading previous posts) that CVF-built DLLs work with IVF EXEs. How is this possible if the naming conventions are different?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
638 Views
Yes - the simple way is to use the /iface:CVF option when building your DLL. This is an option under External Procedures > Calling Conventions. There are also directives for changing the naming and calling conventions in each compiler.

The differences in conventions are:

Calling convention: CVF uses STDCALL, IVF uses C
Naming: CVF follows the STDCALL convention of adding @n to the name, where n is the number of bytes pushed onto the stack for the arguments, IVF doesn't add a suffix
String length: CVF puts it immediately after the string address in the argument list, IVF puts all the string lengths at the end


0 Kudos
thomas_boehme
New Contributor II
638 Views
Yes - the simple way is to use the /iface:CVF option when building your DLL. This is an option under External Procedures > Calling Conventions. There are also directives for changing the naming and calling conventions in each compiler.

The differences in conventions are:

Calling convention: CVF uses STDCALL, IVF uses C
Naming: CVF follows the STDCALL convention of adding @n to the name, where n is the number of bytes pushed onto the stack for the arguments, IVF doesn't add a suffix
String length: CVF puts it immediately after the string address in the argument list, IVF puts all the string lengths at the end



Note that you cannot pass deferred shape arrays, as the binary format of the deferred shape array descriptorhas changed between CVF and IVF. As far as I know, there is no simple solution around this problem.

regards,
Thomas

0 Kudos
Reply