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

Questions regarding error in my FORTRAN code

Mehdi_R_
Beginner
273 Views

Hello,

I have written a code which includes a Main Program and a couples subroutines. One of the subroutines are Bisection method for findings the roots of functions and after ending the Bisection sub, I have added my function. The point is that the function has a couple know variables and an unknown (X) which I need to find through this subroutines. I'm calling Bisection sub from another subroutine where those know variables are included. But, when I start debugging I receive these errors regarding at least two of those variables. BTW, I'm using VS 2008 with Intel compiler 2011.

 

Error    1     error LNK2019: unresolved external symbol _IP referenced in function _F    Bisect_Sub_.obj    

 

Error    2     error LNK2019: unresolved external symbol _MATRIC_L1 referenced in function _F    Bisect_Sub_.obj    

Error    3     fatal error LNK1120: 2 unresolved externals    Debug\gravity flow.exe    

 

I would appreciate if you can help me find my mistakes in this code.

 

Thanks,

M. R.

 

0 Kudos
2 Replies
Steven_L_Intel1
Employee
273 Views

If those are supposed to be variables, it suggests to me that you intended them to be arrays but didn't declare them as arrays. For example, if the compiler sees IP(17) and IP has not been declared as an array, it will instead think it is a function and generate an external reference for it.

Try adding IMPLICIT NONE and see what the compiler complains about. (IMPLICIT NONE Is always a good idea.)

0 Kudos
Mehdi_R_
Beginner
273 Views
This comment has been moved to its own thread
0 Kudos
Reply