- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
링크가 복사됨
3 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Yup, that worked. The project compiles just fine now. Thank you!!
~Stuart
~Stuart