- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I specify the order in which libraries are searched at link time for an unsatisfied external (subroutine)?
Using Microsoft Visual Studio 2005 version 8 and Intel Fortran 10.2.x
Specifically, we have a program requiring two large libraries. Since some of these subroutines in these libraries have the same name we need to choose which library we want to search first.
Using Microsoft Visual Studio 2005 version 8 and Intel Fortran 10.2.x
Specifically, we have a program requiring two large libraries. Since some of these subroutines in these libraries have the same name we need to choose which library we want to search first.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - dsullivan@draper.com
we have a program requiring two large libraries. Since some of these subroutines in these libraries have the same name we need to choose which library we want to search first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, there's no way to guarantee the order. The linker will search libraries specified in the "Additional dependencies" property on the Linker page in that order, but it may revisit them as needed. What you can't do is tell the linker to get only routine X from library A and ignore routine Y also in library A.
What you might do is have a pre-build step that extracts the desired objects from the libraries and builds a special library with just the combination you want.

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