error : LNK2019; LNK2001

error : LNK2019; LNK2001

Raphael C.的头像

Hi,

I'm working on an old fortran project which was made on compaq visual Fortran. When I compile the project I have the following errors :

Error 1 error LNK2019: unresolved external symbol _ETIME@4 referenced in function _SECOND cpu.obj

Error 2 error LNK2001: unresolved external symbol _ETIME@4 main.obj

Error 3 error LNK2001: unresolved external symbol _ETIME@4 io.obj

Error 4 error LNK2019: unresolved external symbol _LNBLNK@8 referenced in function _INPUTREAD io.obj

Error 5 error LNK2019: unresolved external symbol _FDATE@8 referenced in function _WRT_STATE io.obj

Error 6 fatal error LNK1120: 3 unresolved externals Debug/WAHA3.exe

I have tried to link libraries like said in other topics but it didn't work as well. Can somebody help me?

Thanks.

附件尺寸
下载 help.zip4.54 MB
5 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
mecej4的头像

The nonstandard RTL functions/subroutines ETIME, FDATE, etc. are not available if you use the /iface:cvf option. Unless you really need CVF compatibility (e.g., if you have a precompiled library which forces you to use /iface:cvf), do not use it.

I compiled your sources with "ifort /traceback /MD *.f" and it got compiled and linked with no problems.

If you do need CVF compatibility, you may consider editing your sources and adding directives to those subprograms from which the nonstandard routines are called -- directives that specify Intel default linkage rather than CVF linkage.

Raphael C.的头像

Did you compiled with terminal or visual studio? 

How can i compile my sources with "ifort /traceback /MD *.f" in visual studio? 

Thank you very much for your time!

mecej4的头像

I don't have much use for the VS IDE except when debugging, but that's not a significant issue here. The options /traceback and /MD are not important either. However, you do need to make sure that CVF compatibility is NOT specified in the compiler options in the IDE.

Raphael C.的头像

it works !

Thanks!

登陆并发表评论。