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

[Question] Fatal error LNK1120: 3 unresolved externals

Sid_O_
Beginner
685 Views

Hey everyone,

I'm trying to compile an existing fortran project however I keep getting this error.  I searched the forums for similar issues and believe it is an error caused by not linking a file that is included in the program.  

In my case, there are two files called "COMMONS.FOR" and "COMTRN.FOR" which are required in the "REALGAS.FOR" and the "COMMONS.FOR" is also required in "SETUP.FOR".  

Initially, the library files (COMMONS/COMTRN) were not in the solutions explorer, so I dragged them in to the resources folder and tried recompiling hoping that the error would go away... it did not.  You can see below that I have these files in the solutions explorer, but I still get the same error:

Can anyone please help me figure out what I am doing wrong.  Any help is greatly appreciated.

0 Kudos
2 Replies
mecej4
Honored Contributor III
685 Views

In which files are the subroutines/functions PHIQUI, REDQUI, SETQUI defined? Please show their declarations. Are those files included in the build? Attach the build log file from a failed build.

You are mixing up the terminology in describing the problem (for example, you call include files "library files"), which makes it harder to understand what the problem is. 

0 Kudos
Sid_O_
Beginner
685 Views

Hi, thanks for your response.  I ended up figuring it out by looking for where those functions actually were (in a file I forgot to include :p).

0 Kudos
Reply