- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any attempt to compile a .c ( not .cxx) file that includes <windows.h> in a Visual Studio 2019 16.3.5 project using Intel 2019.5 results in the following error
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\include\vcruntime_string.h(18): error : expected an attribute name
1> _NODISCARD _Check_return_
1> ^
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
void test()
{
printf("Hello world\n");
}
workarounds are to compile the offending .c files with the Visual C++ compiler or "compile as C++"
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please use VS2019 versions which released before the compiler released date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As it is well known Visual C++ 2019 pushes point updates on users quite agressively. Reverting to previous point releases of Visual Studio is very difficult if not impossible as the actual version needed may not be downloadable. The information I am providing is
- useful for other users to avoid the issue
- useful for Intel as they will have to fix the issue in a subsequent release
-useful if Intel has a suggested workaround beyond compiling as C++ or with the Visual C++ compiler.
If you know of a workaround, that would be a helpful comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue is that we can't test the compiler if the version of VS2019 weren't available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I realize this is a no-win situation for Intel. Some people like the pace of updates of Visual Studio - I am not so sure it really benefits everyone.
Just a question, on Windows,is there a flag to say "compile as C++" when passed a .c file ?
On linux one can use the "-x c++" option, but that does not exist for Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about /Tp<file>?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding “/Tp” to the additional options list of the command line solves this issue. But a few minor fixes (e.g. explicit casting of the void pointers) will be in order.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page