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

error lnk2019,error lnk1120

kuan__JIANG
Beginner
2,542 Views

hello guys;

I'm working on an old fortran project which was made on compaq visual Fortran,and now run it on intel visual fortran composer XE2011(32bit) with visual studio2010(32bit);

When I compile the project I have the following errors :

(timstart.obj) : error LNK2019: unresolved external symbol  _ETIME@4,referenced in function _timstart.obj
3>(timstop.obj) : error LNK2001: unresolved external symbol  _ETIME@4
3>(timset.obj) : error LNK2001: unresolved external symbol _ETIME@4
3>(fabend.obj) : error LNK2019: unresolved external symbol  _ABORT@0,referenced in function _fabend.obj
3>Release/Relap.exe : fatal error LNK1120: 2 unresolved externals

 

please help me 

thank u very much.

0 Kudos
1 Solution
mecej4
Honored Contributor III
2,542 Views

I am glad to hear that you were able to overcome the problems!

View solution in original post

0 Kudos
10 Replies
mecej4
Honored Contributor III
2,542 Views

You are probably specifying the Compaq calling convention (/iface:cvf). In the subprograms from which ETIME and ABORT are called, verify that you have a USE IFPORT statement prior to any declarations.

0 Kudos
kuan__JIANG
Beginner
2,542 Views

mecej4 (Blackbelt) wrote:

You are probably specifying the Compaq calling convention (/iface:cvf). In the subprograms from which ETIME and ABORT are called, verify that you have a USE IFPORT statement prior to any declarations.

thank you very much.

I found your answer by this:https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/379279

but i don't know how to verify "that you have a USE IFPORT",could you tell more details

thanks a lot.

0 Kudos
mecej4
Honored Contributor III
2,542 Views

Are the object files timstart.obj, timstop.obj, timset.obj and fabend.obj compiled from source files in your project, or are they in a library for which you do not have the sources? In your project, have you specified CVF compatibility?

0 Kudos
kuan__JIANG
Beginner
2,542 Views

mecej4 (Blackbelt) wrote:

Are the object files timstart.obj, timstop.obj, timset.obj and fabend.obj compiled from source files in your project, or are they in a library for which you do not have the sources?

thank u very much.

these timstart.f 、timstop.f、timset.f  files are in my source files and i can edit them,after compile,then generate timstart.obj、timstop.obj etc.

thanks a lot

Linking...
3>Rplib_.lib(gninit.obj) : error LNK2019: unresolved external symbol _GETARG@12,unresolved external symbol _GNINIT 
3>Rplib_.lib(gninit.obj) : error LNK2019: unresolved external symbol _IARGC@0,unresolved external symbol _GNINIT 
3>Rplib_.lib(timstart.obj) : error LNK2019: unresolved external symbol _ETIME@4,unresolved external symbol _TIMSTART 
3>Replib_.lib(timstop.obj) : error LNK2001: unresolved external symbol _ETIME@4
3>Enlib_.lib(timset.obj) : error LNK2001: unresolved external symbol _ETIME@4
3>Enlib_.lib(fabend.obj) : error LNK2019: unresolved external symbol _ABORT@0,unresolved external symbol _FABEND 
3>Release/Rlap.exe : fatal error LNK1120: 4 unresolved external symbol

0 Kudos
mecej4
Honored Contributor III
2,542 Views

In each subprogram within which one or more non-standard subroutines or functions such as ETIME and ABORT are called, insert a USE IFPORT statement immediately after the subroutine/function line. After making these changes, recompile and rebuild.

If you still have problems after you do so, please zip up all the source files and attach the zip file to your reply.

0 Kudos
kuan__JIANG
Beginner
2,542 Views

mecej4 (Blackbelt) wrote:

In each subprogram within which one or more non-standard subroutines or functions such as ETIME and ABORT are called, insert a USE IFPORT statement immediately after the subroutine/function line. After making these changes, recompile and rebuild.

If you still have problems after you do so, please zip up all the source files and attach the zip file to your reply.

thank u very much 

but it didn't work

Enlib\timset.f(80): error #6401: The attributes of this name conflict with those made accessible by a USE statement.   [ETIME]

LINK : fatal error LNK1104: can't open file“dfor.lib”

0 Kudos
mecej4
Honored Contributor III
2,542 Views

We are making progress.

Please show a few source lines in the neighborhood of the offending line (timset.f90, line 80). If it is a type declaration or an interface to ETIME, remove or comment out the declaration.

0 Kudos
kuan__JIANG
Beginner
2,542 Views

mecej4 (Blackbelt) wrote:

We are making progress.

Please show a few source lines in the neighborhood of the offending line (timset.f90, line 80). If it is a type declaration or an interface to ETIME, remove or comment out the declaration.

thank u very much!!!!!!!!!!!

i delete many statement of etime,abort,getarg,irgc

like :real*4 etime,external etime

after delet them ,it works, thank u very very very much!!!

0 Kudos
mecej4
Honored Contributor III
2,543 Views

I am glad to hear that you were able to overcome the problems!

0 Kudos
kuan__JIANG
Beginner
2,542 Views

mecej4 (Blackbelt) wrote:

I am glad to hear that you were able to overcome the problems!

thank u very much!!

0 Kudos
Reply