- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a static library that I am trying to link into a program I am creating. The .lib CONTAINs modules with functions and subroutines inside. When I compile the main program, I get the following compiler error: "Error: Error in opening the Library module file." It seems that the compiler is looking for the .mod files during the link process. I know this because the error went away when I copied the .mod files from the library folder and put them into the main program folder. Do I always have to manually put the .mod files into the compile path or is there just a setting somewhere that will do all this for me? Or does this have something to do with the way I linked the library?
Thanks for any light you can shed on this!
~Stuart
I have a static library that I am trying to link into a program I am creating. The .lib CONTAINs modules with functions and subroutines inside. When I compile the main program, I get the following compiler error: "Error: Error in opening the Library module file." It seems that the compiler is looking for the .mod files during the link process. I know this because the error went away when I copied the .mod files from the library folder and put them into the main program folder. Do I always have to manually put the .mod files into the compile path or is there just a setting somewhere that will do all this for me? Or does this have something to do with the way I linked the library?
Thanks for any light you can shed on this!
~Stuart
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One point of clarification...
The library has modules that CONTAIN functions and subroutines, not what I said in the original post.
The library has modules that CONTAIN functions and subroutines, not what I said in the original post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error is coming from the compiler, not the linker, and it is indeed looking for the .mod files. To specify that they are to come from some directory other than where the compiled source is, add the path under Preprocessor..INCLUDE/USE paths. While a library subproject does pull in the .LIB automatically when linking, it doesn't find the .MODs automatically.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yup, that worked. The project compiles just fine now. Thank you!!
~Stuart
~Stuart

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