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

Problems encountered executing link.exe with Visual Fortran 6

guenkeng
Beginner
951 Views

Hi,

I have created a main program and a subroutine written in fortran and encountered linking problem when "rebuild all" in the Compaq Visual Fortran 6. The two programs are in the same workspace: main program created using "Fortran Console Application" under Project and subroutine created unsing "Fortran Free Format SourceFile" under Files.A "CALL" instruction is use to execute theSubroutine in main program. Below show the problem encountered:

--------------------Configuration: TEST8 - Win32 Debug--------------------
Compiling Fortran...
C:FORTRANFortran PracticeTest8TEST8TESTSUB1.F90
C:FORTRANFortran PracticeTest8TEST8TEST8.f90
Linking...
TEST8.obj : error LNK2001: unresolved external symbol _TEST_SUB1@0
Debug/TEST8.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

TEST8.exe - 2 error(s), 0 warning(s)

I amappreciate if anyone could help me solve the problem. Thanks!

0 Kudos
1 Reply
Steven_L_Intel1
Employee
951 Views
The usual cause of this error is not calling the routine with the correct number or types of arguments.
0 Kudos
Reply