Knowledgebase
Reason for the "no_implementation attribute" build system warning when stating "#import directives" in a pre-compiled header.
Posted by - NA - on 26 December 2017 05:52 PM

Issue: The following build system warning appears when executing your builds " IncrediBuild: build system warning: #import directives in the pre-compiled header should use the no_implementation attribute. See FAQ section in documentation for more details.". 

Cause:

IncrediBuild is notifying you that an imported directive which was found in your pre-compiled header file was not given the "no_implementation" attribute. Your build will likely execute fine regardless, but we give you this warning for two reasons:

  1. You may get a "file not found" error when compiling if one of the source files included in your pre-compiled header includes a .TLI file. including the "no_implementation" attribute removes this error.
  2. Without this attribute, your compilation time may be increase due to the larger PCH files.

Fix:

The following explanation is from the MSDN Library topic on "#import":

"The implementation_only attribute is intended for use in conjunction with the no_implementation attribute as a way of keeping the implementations out of the precompiled header (PCH) file. An #import statement with the no_implementation attribute is placed in the source region used to create the PCH. The resulting PCH is used by a number of source files. An #import statement with the implementation_only attribute is then used outside the PCH region. You are required to use this statement only once in one of the source files. This will generate all the required wrapper member functions without additional recompilation for each source file."

(1169 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako xoreax.helpserve.com