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

Error error #1292: unknown attribute "no_init_all" when compiling with VS2019 and Windows Kits 10.0.18362.0

Plougonven__Brendan
4,980 Views

Hi, 

I installed Intel parallel studio XE 2020, with the latest patch, version (icl.exe version 19.1.1.216 Build 20200306) on a Windows 10 machine where Visual Studio 2019 is also installed also with the latest updates (cl.exe version 19.25.28611). I use the Windows sdk 10.0.18362.0.

Building our application with VS2019 works fine. However, if i use the Intel compiler i get the following errors: 

C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winnt.h(3886): error #1292: unknown attribute "no_init_all"
     typedef struct DECLSPEC_ALIGN(16) DECLSPEC_NOINITALL _CONTEXT { 

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\INCLUDE\xmmintrin.h(61): error #2277: invalid definition of __m128; use #include "xmmintrin.h" instead
     typedef long long __m128;

Has anyone already had these errors and know how to solve them ?

Thanks,

Brendan

 

0 Kudos
7 Replies
RahulV_intel
Moderator
4,979 Views

Hi,

Could you provide us the minimal reproducible code snippet so as to verify this issue at our end?

 

Regards,

Rahul

0 Kudos
Plougonven__Brendan
4,979 Views

Hi, 

I uploaded a small testcase. In test.cpp, i simply include winsock2.h. The file testcase.txt also shows the output and the error. 

If you have any insight as to why this error occurs, it would be very helpful. 

Regards, 

Bendan

0 Kudos
RahulV_intel
Moderator
4,979 Views

Hi,

Sorry for the delayed response.

Could you confirm if you are able to compile/run a simple C++ problem(just print something) without using winsock2.h header file in your program?

 

--Rahul

 

0 Kudos
Plougonven__Brendan
4,979 Views

Hi,

Thanks for your help. Indeed, i could compile a simple program and i understood what caused the compile error i observed. I did not set the build environment using  "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2020\bin\psxevars.bat" because i wanted to control the initialization of the environment, but i did not include all the required directories for the header files. When using psxevars.bat intel64 vs2019, the build process works fine.

Best regards, 

Brendan

 

0 Kudos
RahulV_intel
Moderator
4,979 Views

Hi Brendan,

Ideally, setting the environment using bat file is preferred. Since you have figured out the issue, shall we go ahead and mark this thread as closed?

 

--Rahul

 

0 Kudos
Plougonven__Brendan
4,979 Views

Hello Rahul, 

Yes, you're right and i changed our build scripts to use the bat file instead of setting the build environment manually. 

Yes, we can mark this thread as closed. Thanks for your help, 

Best regards,

Brendan 

0 Kudos
RahulV_intel
Moderator
4,979 Views

Thanks for the confirmation.

0 Kudos
Reply