For builds using ICC, a part of export symbols can be lost:
while there is no such troubles for builds using MSVC:
- builds of "Defaulted default constructor outside of class definition in the code" using ICC with PCH,
not reproduced for:
- builds of "Defaulted default constructor outside of class definition in the code" using ICC without PCH,
- builds of "Defaulted default constructor in the code" using ICC with PCH,
- builds of "Defaulted default constructor outside of class definition in the code" using MSVC with PCH.
Wherein a content of precompiled headers, used for that builds, has no effect on this issue. I.e., the same error reproduced even if '.h' file, used to produce '.pch' file, contain a space symbol only.
- Windows 10 x64,
- IPSXE 2017 Update 5,
- MSVC 2017 15.3.3,
- Windows SDK 10.0.15063.468,
- Qt-5.10-dev (4ad6292028fde7cba698b9c1f7d7d080772d6cd2).
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Parallel Computing
As another possible ICC issue, related to PCH use, can be considered precompilation of testcase from Description using ICC and MSVC:
icl -c -Yc -Fptest_icc_pch.pch -Fotest_icc_pch.obj -Tp test.cpp Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 188.8.131.52 Build 20171018 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. test.cpp test.cpp(2): warning #2728: could not create precompiled header file struct __declspec(dllexport) SelectionContext ^ <snip> cl -c -Yc -Fptest_msvc_pch.pch -Fotest_msvc_pch.obj -Tp test.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25830.2 for x64 Copyright (C) Microsoft Corporation. All rights reserved. test.cpp <snip> dir /B test* test.cpp test_icc_pch.obj test_msvc_pch.obj test_msvc_pch.pch
Found no evidence, that it occur during build of notable OSS projects. But still odd, that ICC failed to produce '.pchi' file from test case, while MSVC built it successfully.
What about error, mentioned in Post #2? Is it expected behavior, or it was registered in that ticket too?
Concerning post #2, the command line option Fpfoo.pch requests that the precompiled header file be created in a file suffixed with .pch, but Intel precompiled header files have a different format than the Microsoft precompiled header files. Microsoft names their files .pch and Intel uses .pchi to avoid confusion and error.