views:

374

answers:

1

I'm working with an API that is delivered to customers as a static library. This library in turn makes use of another 3rd party library built with the Intel Compiler. This library has dependencies to some Intel libraries that I don't possess. When I build a test application I get past this by specifying these libraries in the "Ignore specific library" in Visual Studio. What actually happens here? Where does VS get these symbols instead? Also

Will doing this remove optimizations that were intended from the Intel Compiler?

If instead I would get those libraries, would that lead to processor restrictions on an executable linked to my library?

A: 

To quote the VS documentation, this option...

...lets you remove a specified library or libraries from the list of libraries it searches when resolving external reference. The linker resolves references to external definitions by searching first in libraries that you explicitly specify, then in default libraries specified with the /DEFAULTLIB option, and then in default libraries named in .obj files.

I.e. it tells the linker not to consider the specified libraries when resolving symbols. As long as the linker can find the symbols in other libraries then the link shouldn't fail.

If you don't have the libraries then i'm surprised you need to specify anything - i don't see how that would have any effect.

If you want to see what the linker actually does, then set the "Show Progress" option to /VERBOSE and relink.

jon hanson
Yes I saw that paragraph on MSDN. But in my case I guess the 3rd party library (or some of its object files) must somehow tell the linker it prefers to be linked with Intel's libraries. So the question remains - will ignoring this "request" give any performance hit? (I will try the /VERBOSE option though)
Lightman
It's possible the library specifies the intel libraries via a #pragma comment (linker ...) directive. Do you know what symbols are now being found in the non-intel libs? I guess it's possible that the implementations in the intel libs were ore optimised than whatever you're now linking to - impossible to say for sure witout knowing more about the intel libs and whatever you're now linking to. To be honest i'd be more worried about the them doing completely different things.
jon hanson
Thanks, I now analyzed one of the object files of the 3rd party library using dumpbin and found it had "defaultlib:" entries (libirc.lib, svml_disp.lib and so on). I'm not sure how I can see what symbols are affected when I choose to ignore these libraries, but maybe there's away.The core of the question I guess is - does the 3rd party think they're doing us a favor by building with Intel Compiler and does that favor become worthless when we don't use the optimized implementations anyway...
Lightman