- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Was curious as to what is actually contained (generally speaking) in a CVF 6.6C static library built from the following code:
module v9
real :: radar(29) = 32
end module
real :: radar(29) = 32
end module
module version
character(80) :: filename
integer :: ios
character(80) :: filename
integer :: ios
contains
integer function trymod
use v9
trymod = radar(1)
end function
end module
I see references to the module content, but it seems almost useless without the separate .mod files (actually it seems entirely unnecessary).
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The .lib contains the code for the module procedure and the storage for the module variables. The .mod provides symbol table information about the declarations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, since I've always packaged modules in the same file as the main program,I guess I was confused on where the "object" module was stored. I assumed that the .mod file was "complete" (and redundant with the library, but of proprietary format because of the additional content). So in some cases I need both the library and the .mod file but in some cases I only need the .mod file or I always require both (and the object code is simply inherently includedin the single file approach that I typically use)?
Boy that's a pretty fundamental confusion isn't it??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now you've confused me!
You can simplify things by assuming that you always need the .obj/.lib and the .mod. Sometimes the object code is not needed, but it never hurts...
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