- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
first I must confess that I am not very familiar with Fortran > 77, so this might be a trivial problem.
I got some Fortran code from a BS2000 which seems to be Fortran > 77 using modules, free format etc. The problem I have is that the build fails with many error messages like
Error in opening the Library module file [somemodule]
This error is caused by
use somemodule
but makes me wonder because I see that module in the same file (all the sources are in one file):
module somemodule
use anothermodule
.
.
subroutine aplott ()
...
! some calculation code
.
end subroutine aplott
end module somemodule
Any idea what is wrong with that code? Does it have to do with the subroutine inside? If so, why does it work on the BS2000?
TIA
first I must confess that I am not very familiar with Fortran > 77, so this might be a trivial problem.
I got some Fortran code from a BS2000 which seems to be Fortran > 77 using modules, free format etc. The problem I have is that the build fails with many error messages like
Error in opening the Library module file [somemodule]
This error is caused by
use somemodule
but makes me wonder because I see that module in the same file (all the sources are in one file):
module somemodule
use anothermodule
.
.
subroutine aplott ()
...
! some calculation code
.
end subroutine aplott
end module somemodule
Any idea what is wrong with that code? Does it have to do with the subroutine inside? If so, why does it work on the BS2000?
TIA
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran standard requires that a module be "available" at the time a USE of the module is seen. For a module in the same source file as the USE, the module must precede the USE in the source. I know some compilers allow the module to appear later in the source file, but ours does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
thanks a bunch, that was indeed the reason for my trouble.
I have looked up for some module using in "Fortran 90 programming" (Addison Wesley) but this issue is not mentioned there. Most Google hits led me to the INCLUDE path, but the compiler still showed this error.
So again, thanks a lot!
thanks a bunch, that was indeed the reason for my trouble.
I have looked up for some module using in "Fortran 90 programming" (Addison Wesley) but this issue is not mentioned there. Most Google hits led me to the INCLUDE path, but the compiler still showed this error.
So again, thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
one more question concerning modules:
Within Visual Studio 2003, the debugger is not able to resolve the variables defined in the modules but used in the main program. I only see "undefined variable". What can I do to make VS display the values for the variables?
one more question concerning modules:
Within Visual Studio 2003, the debugger is not able to resolve the variables defined in the modules but used in the main program. I only see "undefined variable". What can I do to make VS display the values for the variables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In a QuickWatch window, use the syntax modulename::variablename

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page