I am very new to Fortran and the entire Intel compilation (I use the Windows-based Intel compiler with the IMSL library without Visual Studio integration, therefore only on the command line).
The problem should be extremely simple: I have a Fortran program that I need to compile, which is stored as four different parts of the source code. The main program (and some subroutines) are stored in a code file called central.for, and there are also three files, let them call s1.for, s2.for and s3.for, each of which contains only one subroutine (lets call them sub1 -sub3) and no main program. The main program calls the routines stored in s1-s3, as well as in central.for.
The question is how to compile it:
When I try to compile central.for, it gives error LNK2019: unresolved external symbol _SUB1 referenced in function _MAIN__. Similarly, it gives the same message for SUB2 and SUB3.
When I try to compile s1.for-s3.for, it gives error LNK2019: unresolved external symbol _MAIN__ referenced in function _main
It seems obvious that I need to somehow connect them. However i have no idea how
johnv source
share