Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
7749 Discussions

Problems switching from MSVC to Intel C++ 2022 and DPC++ 2022

Daniel_D
Beginner
1,178 Views

Hi,

 

I have an existing project (Windows 11, VS2022, C++, std 17, 64-bit, ANSI-charset, DLL - using boost and openssl) that compiles without any warning with the MSVC and clang Toolset. If I switch to Intel C++ 2022 I see this error message:

 

1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel C++ Compiler 2022\Toolset.targets(288,9): error MSB4064: The "CheckUnicodeSecurity" parameter is not supported by the "ICX" task loaded from assembly: Intel.Build.ICXTasks.v170, Version=22.0.0.0, Culture=neutral, PublicKeyToken=3c0c138f5bbab72f from the path: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Intel.Build.ICXTasks.v170.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel C++ Compiler 2022\Toolset.targets(226,5): error MSB4063: The "ICX" task could not be initialized with its input parameters.
1>Done building project "AlgoEthash-Windows.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

 

 

 

In the end I want to switch to the DPC++ 2022 compiler to make use of integrated GPU. But switching to this compiler gives much more warnings and errors compiling the existing dll:

 

Most messages are:

1>T:\\Development\\3rdParty\\boost_1_79_0\\include\boost/winapi/character_code_conversion.hpp(21,35): : warning : '__stdcall' calling convention is not supported for this target [-Wignored-attributes]

1>BOOST_WINAPI_IMPORT_EXCEPT_WM int BOOST_WINAPI_WINAPI_CC
1> ^
1>T:\\Development\\3rdParty\\boost_1_79_0\\include\boost/winapi/basic_types.hpp(51,32): note: expanded from macro 'BOOST_WINAPI_WINAPI_CC'
1>#define BOOST_WINAPI_WINAPI_CC WINAPI
1> ^
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(128,21): note: expanded from macro 'WINAPI'
1>#define WINAPI __stdcall

 

 

and the error are:

1>In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\atlmfc\include\atlsocket.h:26:
1>In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\atlmfc\include\atlconv.h:27:
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\atlmfc\include\atlalloc.h(621,5): : error : SEH '__try' is not supported on this target
1> __try
1> ^

 

and

 

1>T:\\Development\\3rdParty\\boost_1_79_0\\include\boost/config/requires_threads.hpp(82,4): : error : "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
1># error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"

 

while the threading support looks to me like turned on:

Daniel_D_0-1652677945360.png

 

 

Anyone have an idea what the problems are?

 

Thanks a lot.

 

Labels (2)
0 Kudos
9 Replies
HemanthCH_Intel
Moderator
1,143 Views

Hi,


Thank you for posting in Intel Communities.


Could you please provide us with the sample reproducer code and steps to reproduce your issue at our end? So that we can investigate more on your issue.


Thanks & Regards,

Hemanth


simmse
Beginner
1,105 Views

Hello Hemanth,

It is not the code files that cause this problem.  I obtain the CheckUnicodeSecurity parameter message with a one line Hello World project including iostream.  The Windows 10, 21H1 virtual system with this build message has Visual Studio 2022, 17.2.1 and the separate installation path Visual Studio 2022, 17.3.0, Preview 1.  The 2022.2 oneAPI Base, HPC, and 32 bit base are installed from the official offline installation files.  The project is set for the classic C++ compiler, 2021.6 (e.g. Intel C++ 19.2 in the Visual Studio Solution Explorer)

 

1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel C++ Compiler 19.2\Toolset.targets(465,4): error MSB4064: The "CheckUnicodeSecurity" parameter is not supported by the "ICL" task loaded from assembly: Intel.Build.ICLTasks.v170, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3c0c138f5bbab72f from the path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Intel.Build.ICLTasks.v170.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.
1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel C++ Compiler 19.2\Toolset.targets(349,5): error MSB4063: The "ICL" task could not be initialized with its input parameters.

 

The above output occurs only with the classic compiler, not the ICX.exe.  The ICX.exe compiles without the above error.  Both the oneAPI base and HPC have been re-integrated with Visual Studio 2022 using the Add/Remove components selection in the oneAPI installer screen.  The error only happens with release x64 or debug x64.  Perhaps the integration is not correct.  Inside the vcxproj there can be a CheckUnicodeSecurity tag.  However, it is not known when this value true or false is always passed for an x64 compilation. 

 

HemanthCH_Intel
Moderator
1,073 Views

Hi @Daniel_D ,

 

We haven't heard back from you, could you please try the process mentioned by @simmse  in the above post(" The ICX.exe compiles without the above error.  Both the oneAPI base and HPC have been re-integrated with Visual Studio 2022 using the Add/Remove components selection in the oneAPI installer screen. ") and let us know if it resolves your issue with the ICX and DPCPP compiler?

 

Thanks & Regards,

Hemanth

HemanthCH_Intel
Moderator
1,071 Views

Hi @simmse ,

 

From your post, we can see that you are using the unsupported version of Visual studio for the oneAPI HPC toolkit. Could you please try with any one of the supported versions?

You can find the supported versions from the below link:

https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-...

 

>>"The 2022.2 oneAPI Base, HPC, and 32-bit base are installed from the official offline installation files"

Could you please confirm whether you have downloaded 32-bit oneAPI Base, HPC toolkits, and trying to compile for the X64 debug and x64 release modes?

 

If your issue still exists with the supported versions, Could you please provide the steps to reproduce your issue at our end?

 

Thanks & Regards,

Hemanth

 

HemanthCH_Intel
Moderator
1,033 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & Regards,

Hemanth


Daniel_D
Beginner
1,028 Views

Hi Hermanth,

 

I will try to get a small sample ready for you over the weekend.

We already switch back to MSVC and clang since we run into too much problems with ICX/DPC++, so this issues is no longer important to us. MSVC/clang and gcc works fine for us so far but we cannot get our project compiler with any of the intel compilers in the state we have the project now. But we continue to try.

 

Thanks,

 

HemanthCH_Intel
Moderator
980 Views

Hi,


We haven't heard back from you. Could you please provide the sample reproducer code and steps to reproduce your issue?


Thanks & Regards,

Hemanth


HemanthCH_Intel
Moderator
914 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Thanks & Regards,

Hemanth


Daniel_D
Beginner
279 Views

Hi Hemanth,

 

sorry for my late reply, but I switch to other compilers since I got many issues with the Intel DPC.

 

I can compile my project with any of these compilers without any issue and with no warnings:
- MS v143 

-LLVM Clang (v15)

-Intel C++ 2022 (from oneAPI Base Toolkit - v 2022.3)

works but still gives this warning for every file:
06:50:59:438 1>Target ClCompile:
06:50:59:438 1> In file included from <built-in>:412:
06:50:59:438 1> <command line>(4,9): : warning : '__INTEL_LLVM_COMPILER' macro redefined [-Wmacro-redefined]
06:50:59:438 1> #define __INTEL_LLVM_COMPILER 20220200
06:50:59:513 1> ^
06:50:59:513 1> <built-in>(7,9): note: previous definition is here
06:50:59:513 1> #define __INTEL_LLVM_COMPILER 20220201
06:50:59:513 1> ^
06:51:03:701 1> 1 warning generated.
06:51:09:497 1> In file included from <built-in>:412:

 

 

 

Using Intel oneAPI DPC++ compiler 2022 comes with some issues - for one there is a fix, not sure if it comes with any side-effects:

1.  1>T:\\Development\\3rdParty\\boost_1_80_0\boost/config/requires_threads.hpp(82,4): : error : "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"

This one can be fixed by defining 'BOOST_HAS_THREADS'

 

 

 

2, T:\\Development\\3rdParty\\boost_1_80_0\boost/winapi/get_last_error.hpp(21,53): : warning : '__stdcall' calling convention is not supported for this target [-Wignored-attributes]
06:44:19:933 1> BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetLastError(BOOST_WINAPI_DETAIL_VOID);

 

Just a warning, but no other compiler shows this and there is a ton of them.

 

 

 

3. 06:42:36:147 1>T:\\Development\\3rdParty\\boost_1_80_0\boost/asio/detail/impl/win_mutex.ipp(56,3): : error : SEH '__try' is not supported on this target
06:42:36:147 1>T:\\Development\\3rdParty\\boost_1_80_0\boost/asio/detail/impl/win_static_mutex.ipp(93,3): : error : SEH '__try' is not supported on this target

For this one I already tries 'GTEST_HAS_SEH=0', but without any success.

 

Any idea?

 

Thanks,

Daniel

 

 

 

 

 

Reply