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

Calling Intel Fortran dynamic link library from Compaq fortran

akrallis
Beginner
695 Views
Is there a problem when calling a dynamic link library, created in Intel Fortran, from a Compaq Fortran console application? For example, I created a dll using Intel Fortran v11. Then I created a console application under Intel Fortran v11 to call the dll. I included the .dll and .lib files in the project and it worked. Then, I created a console application using Compaq Fortran v6.0, I included the .dll and .lib files created under Intel Fortran in the project, and I had the following linking error:
--------------------Configuration: workbook for simple calling from compaq
- Win32 Debug--------------------
Linking...
sub.obj : error LNK2001: unresolved external symbol _PROCESS_MODEL@12
Debug/workbook for simple calling from compaq.exe : fatal error LNK1120: 1
unresolved externals
Error executing link.exe.
workbook for simple calling from compaq.exe - 2 error(s), 0 warning(s)
--------------------Configuration: workbook for simple calling from compaq- Win32 Debug--------------------Linking...sub.obj : error LNK2001: unresolved external symbol _PROCESS_MODEL@12Debug/workbook for simple calling from compaq.exe : fatal error LNK1120: 1unresolved externalsError executing link.exe.
workbook for simple calling from compaq.exe - 2 error(s), 0 warning(s)
0 Kudos
3 Replies
mecej4
Honored Contributor III
695 Views
CVF 6.x and Intel Fortran (all versions since 4.0) use different default calling conventions. Both have compiler switches to produce code compatible with the other.

However, if you have the sources for the DLL as well as the console application, what reason is there to use more than a single compiler for the entire project?
0 Kudos
akrallis
Beginner
695 Views
We do that due to confidentiality reasons. We use a licence from Intel Fortran and we produce a dll for a customer that has Compaq Fortran.
Regarding these switches that you mentioned, could you please provide me more details?
0 Kudos
Steven_L_Intel1
Employee
695 Views
/iface:cvf is the primary option you want. This will make Intel-generated routines have CVF-compatible interfaces. In Visual Studio, this is project property Fortran > External Procedures > Calling Convention > CVF.
0 Kudos
Reply