Error: Unresolved reference



Why do I get unresolved reference errors from the linker when I use the Instrument Inline Functions setting in Visual C ?


If you turn on Instrument Inline Functions in the TrueCoverage Settings dialog in Visual C or you specify /NMttInlines for NMCL,  a subsequent link step of certain applications might result in unresolved reference errors from the linker. These applications are not linking against certain libraries, because they do not expect to need them.  If you specify Instrument Inline Functions,  the compiler keeps all the inline functions, normally in a header file,  whether or not they are used and they become part of the resulting object module.  If these inline functions in turn call other functions in libraries that are not specified in the link step, then the unresolved references will occur.   If you specify the necessary libraries in the link step, then you will not encounter this problem.

Old KB# 11481
Comment List
Related Discussions