- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have three projects:
Project A (A.lib) : Fortran library (BLAS routines)
Project B (B.lib) : C library (CBLAS routines)
Project C (C.exe) : main program in C
B.lib links with A.lib. The main program C.exe links with B.lib.
When I built C.exe, VC.Net told me it neededsome Intel Fortran libraries:
ifconsol.lib
libifcore.lib
libifport.lib
libirc.lib
libm.lib
If Iset thepath of Intel Fortran libraryinVS.NET, it will work fine.
How can I build C program withoutIntel Fortranlibraries?
weichao
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
B isn't linked with anything - it isn't linked. All the linking occurs when the EXE is built. The Fortran code in A needs the Fortran libraries and if routines in A are called, directly or indirectly, you need the Fortran libraries when building C.exe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
B.lib will be linked with A.lib if I define the library A.lib in Project->Properties->Librarian->General->Addional dependencies. In project C, only B.lib is defined and I don't need to tell VC anything about A.lib.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is not the way it works. A .LIB is not linked. What you have done with the project dependencies is tell VS.NET to include the libraries of all the dependent projects, even dependents of dependents, when the executable is linked. So even though you don't tell project C about A, you did tell it about B which knows about A. That establishes the dependence chain. You can see this if you look at the build output log.

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