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

unresolved external GETDAT

ferrad
Nueva usuaria
962 Vistas
I have some calls to GETDAT, GETTIM, etc in my subroutine. During linkage with 9.0 I get unresolved externals (I have libifport.lib in the LIB env. var):
error LNK2019: unresolved external symbol _GETDAT@12 referenced in function _WRITIT
error LNK2019: unresolved external symbol _GETTIM@16 referenced in function _WRITIT
The problem goes away if put in a "use IFPORT" at the top of the routine. However this code still has to compile under CVF. How do I fix the unresolved externals without putting in code the CVF can't understand?
Adrian
0 kudos
3 Respuestas
TimP
Colaborador Distinguido III
962 Vistas
I think you'll have to bite the bullet and either use standard Fortran calls (you should never use a compiler which doesn't have DATE_AND_TIME()), or set up so that you have
USE IFPORT
when compiling with ifort and
USE DFPORT
or whatever, when using CVF. Or, a last resort, if the declarations are consistent between CVF and ifort, copy them into your source.
ferrad
Nueva usuaria
962 Vistas
use DFLIB still works in ifort, so I just put that in.
Adrian
Steven_L_Intel1
Empleados
962 Vistas
Your project was likely converted from CVF and thus had the "use CVF calling convention" option set. If you just call GETDAT without using the module, you'll get a call with STDCALL conventions that doesn't link. With default conventions, it should link.

I do agree that using DATE_AND_TIME is a better option, overall.
Responder