Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

"Calling convention differs in PCH" error while working with /MP Flag 2023

MordiD
Novice
1,421 Views

Hi

I'm using visual studio 2022 (17.4.5) with OneApi tool kit 2023.0.0

 

I'm getting the following error when activating the /MP flag  in my intel c++ 2023 project

TRACKEDEXEC : error : default calling convention differs in PCH file vs. current file

 

if I'm using intel processor-specific Optimization I'm also getting :

PCH file was compiled for the target CPU 'core-avx2' but the current translation unit is being compiled for target 'x86-64'

 

the temporary workaround is to disable the usage of precompiled headers. 

is this a known issue?  

 

Virtual machine:
Win 10 (21H2)
16GB
with intel xeon gold 6256 CPU 

 

icx-cl command log:

C:\***\STDAFX.CPP
/c /Qm64 /Zi /nologo /W3 /WX /O3 /Ob2 /Oi /Ot /D __INTEL_LLVM_COMPILER=20230000 /D _USRDLL /D _ATL_ATTRIBUTES  /D NDEBUG /D /D _WINDOWS /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE /D _HAS_ITERATOR_DEBUGGING=0 /D _WINDLL /D _UNICODE /D UNICODE /EHa /MD /GS- /fp:fast /QxCORE-AVX2 /Zc:forScope /Yc"stdafx.h" /Fp"C:\***.PCH" /Fo"C:\***\\" /TP /Zc:wchar_t- /bigobj C:\***\STDAFX.CPP

Labels (2)
0 Kudos
1 Solution
SantoshY_Intel
Moderator
1,329 Views

Hi,


Thanks for providing the details. We were able to reproduce your issue. This is a known issue with ICX compiler.


We have provided your feedback to the relevant team. At this moment there is no visibility of when it will be implemented and available for use. Please let me know if we can go ahead and close this case.


Thanks & Regards,

Santosh


View solution in original post

0 Kudos
4 Replies
SantoshY_Intel
Moderator
1,372 Views

Hi,

 

Thanks for posting in Intel communities.

 

Could you please provide us with a sample reproducer code & complete steps to reproduce your issue from our end?

Also, please confirm which compiler you were using? And provide us the ouput of the below command after initializing the Intel oneAPI environment:

 

sycl-ls

 

 

Thanks & Regards,

Santosh

 

0 Kudos
MordiD
Novice
1,365 Views

Steps to reproduce:

please find attached a simple console application:
step to reproduce:

1.create console applicaiton
2. add stafx.h
3. convert the project to intel c++2023

4.  C++->precomplied headers->precomplied headers-> create Yc
5. build project
6. C++->precomplied headers->precomplied headers-> use (Yu)
7. C++->General-> MultiProcessor Compilation Yes(/MP)
8. Compile:

 

the following error will appear:

error: default calling convention differs in PCH file vs. current file
 

I also notice that if after step 4 I add an additional empty class and run build , the compiler sends a message:
support for '/Yc' with more than one source file not implemented yet; flag ignored [-Wclang-cl-pch]argument unused during compilation: '/Fpx64\Debug\ConsoleApplication1.pch' [-Wunused-command-line-argument]

Mordi

 

0 Kudos
SantoshY_Intel
Moderator
1,330 Views

Hi,


Thanks for providing the details. We were able to reproduce your issue. This is a known issue with ICX compiler.


We have provided your feedback to the relevant team. At this moment there is no visibility of when it will be implemented and available for use. Please let me know if we can go ahead and close this case.


Thanks & Regards,

Santosh


0 Kudos
SantoshY_Intel
Moderator
1,304 Views

Hi,

 

Thanks for confirming. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.

 

Thanks & Regards,

Santosh

 

0 Kudos
Reply