Why can't my Fortran code find the subroutine DEVCRG?

In summary, the conversation revolves around an error in compiling a Fortran code, specifically the unresolved external symbol _DEVCRG@24. It is suggested that this error may be due to a missing subroutine, DEVCRG, belonging to the IMSL Fortran Numerical Math Library. The speaker asks for help in linking the library to their code, and it is mentioned that the Intel Fortran Compiler or gfortran can be used as alternatives.
  • #1
irida65
2
0
Hello,
I have a code in Fortran that I can compile but when I try to build it I get the following messages:
error LNK2001: unresolved external symbol _DEVCRG@24
fatal error LNK1120: 1 unresolved externals

I guess that it does not understand it cannot find the subroutine DEVCRG, but I do not know the reason why...
Please help
 
Computer science news on Phys.org
  • #2
Hi
DEVCRG is a library routine belonging to the IMSL® Fortran Numerical Math Library.
I guess you need to link against this library to get it to work.
Which compiler are you using and which OS?
 
  • #3
Thanks for the reply,
I compile with Fortran Powerstation 4.0, Microsoft developer studio and my OS is windows xp sp2. Please tell me where can I download this library and how can I link it to my code?
 
  • #4
Hey
I found the following forum thread concerning a similar problem
http://forums.vni.com/showthread.php?t=531"
If I have understood everything correctly you have to buy the Intel Fortran Compiler together with IMSL if you want to use Visual Studio.
One free alternative is to use gfortran which is a part of GCC (http://gcc.gnu.org/" ).
 
Last edited by a moderator:

What is an error message in Fortran?

An error message in Fortran is a notification that appears when the compiler detects an error in the code. It indicates that there is an issue with the syntax or logic of the program and the compiler is unable to execute it.

What are some common causes of error messages in Fortran programs?

Some common causes of error messages in Fortran programs include syntax errors, typos, missing or incorrect input data, and logical errors in the code. It is important to carefully review the code and check for any mistakes before compiling.

How can I troubleshoot and fix error messages in Fortran?

To troubleshoot and fix error messages in Fortran, start by carefully reading the error message and identifying the line of code where the error occurred. Then, check for any obvious mistakes or typos in that line. If the error is not obvious, use a debugger or print statements to track the flow of the program and identify the source of the error.

What is the difference between a compile-time error and a run-time error in Fortran?

A compile-time error occurs when the code is being compiled, and the compiler is unable to generate an executable file. This is usually due to syntax errors or missing dependencies. A run-time error occurs when the compiled program is being executed and encounters an issue that prevents it from completing successfully. This can be caused by logical errors or unexpected input data.

Are there any tools available to help identify and fix error messages in Fortran?

Yes, there are several tools available to help with error messages in Fortran, such as debuggers, syntax checkers, and code editors with built-in error detection. These tools can help identify and fix errors in the code, making the debugging process more efficient and effective.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Computing and Technology
Replies
6
Views
1K
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
1
Views
250
  • Programming and Computer Science
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Programming and Computer Science
Replies
7
Views
3K
  • Programming and Computer Science
Replies
17
Views
4K
  • Programming and Computer Science
Replies
9
Views
1K
Back
Top