- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
If A.LIB calls routines in B.LIB, can A.LIB be built before B.LIB has been built?
The reason I'm asking this is for times when I'm not sure if A.LIB is actually calling any routines in B.LIB. If B.LIB is being called, but I don't have it, will I get unresolved externals when building A.LIB or when building the final main program that pulls everything together?
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
No, you won't get ANY unresolved externals when building a static library. All that resolving happens at link time.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Think about this point: when you compile and link any Fortran program, your sources get compiled into *.OBJ files which are then linked to the libraries that came with the compiler. Those libraries could have been built weeks/months/years before your own object and library files were created.
For the whole build system to work, there can be no required temporal precedence rules that govern the files that are presented to the linker, other than the requirement that all of them should exist before the linker is asked to build the EXE or DLL that you request.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks, Steve. That's exactly what I want to find out.
I will soon be taking my first steps into using Intel's MKL to utilize its Lapack routines.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
mecej4 - My knowledge of the overall build process is skimpy. I wasn't sure if building A.LIB was itself a linking process that required B.LIB.
Is it correct that a .LIB file made from fifty .obj files is just a simple container for the fifty .obj files? I suppose mainly for convenience purposes.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Yes, that's really all it is. (Unless you build those .OBJs into a DLL in which case the .LIB is an "import library" that serves to connect DLLEXPORTed names to locations in the DLL.)
