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

error LNK2019: unresolved external symbol _<FortranInterface>@16 referenced in function _<FortranSubroutine>

Anil_Kumar_Narayana_
847 Views

Hi,

I am getting below error while trying to build my C++ project using the newly created Fortran .lib file.

error LNK2019: unresolved external symbol _whlrealft@16 referenced in function _WGPR50. Here 'whlrealft' is an Interface available in Fortran and 'WGPR50' is the subroutine name of the Fortran.

Earlier Compaq Visual Fortran was used to create the static Library. Now I am using Intel Visual Fortran 9.1. I was able to build Fortran project in Visual Studio 2003 IDE. When I am using the newly created .lib in C++ project I am getting above said error. C++ project also uses Visual Studio 2003 IDE. Could you please help me to resolve this issue?


0 Kudos
1 Reply
mecej4
Honored Contributor III
847 Views
The @16 was actually added by the C++ compiler in response to a compiler option to use Stdcall, or by specifying attributes for the external function in the C++ code. The programmer who wrote the C++ code probably did this to make it work with calls to CVF-compiled routines.

The default calling conventions of CVF and IFort are different. See the link "Migrating from CVF".

Please read the chapter on Mixed Language Programming in the IFort User's guide and decide how to proceed, keeping in mind that CVF conventions will not be available when you move to 64-bit code.
0 Kudos
Reply