- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Despite a lot of reading in user guides and advice from others on this forum, I am still having trouble understanding how best to incorporate object files and module files in my project that have been independently compiled.
I know how to create a static library of object files and reference that library in my project, but what if the object file is not in a library? It has been suggested that i can simply use Visual Studio to add the obj file to my project, but it doesn work--I still get unresolved external linker errors. Is this supposed to work?
I can use VS to specify project properties > Linker > Input and enter the entire obj filename (including path) but that is a fair amount of work and error prone.
As for modules, we would like to create a library-like collection that can be USEd by various projects, but this seems to be awkard. An independently compiled module creates two files: mymod.obj and mymod.mod. The obj file is needed for compiling a project and the mod file is needed for linking. So, as I best understand it, a "library-like" environment involves two steps:
1. Put the *.mod files in a special directory and make that directory available to projects, globally using VS Tools > Options > Intel Visual Fortran > Compilers > Includes, or project-specific using VS Project Properties > Fortran > General (or Preprocessor) > Additional Include Directories.
2. Make the *.obj files accessible to the program. But this is not as easy as it might be, as described above.
All of this effort is putting a damper on the notion around here of producing general-purpose modules. Can anyone suggest how to streamline it?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DBoggs wrote: "The obj file is needed for compiling a project and the mod file is needed for linking."Correction: The mod file is needed for compiling a project and the obj file is needed for linking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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