- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to compile working code with intel c++ 2022.
I get the error _popcnt32 is undefined
Previously, including <immintrin.h> was all that was needed.
Why it is an error?
Thanks
Sorin
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please provide us with a sample reproducer so that we can investigate your issue from our end?
You have mentioned that you are using C++ compiler 2022 meaning nextgen compiler on Visual Studio. In that case, can you please share the version of Visual Studio that you are using?
Thanks and Regards,
Ditipriya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cannot post all the code
but
I include:
#include <immintrin.h>
int mCmp = _mm256_movemask_epi8(Cmp);
int NewErrors = _popcnt32(mCmp);
The error is the same for Visual Studio 2019 and 2022
(it works with Intel compiler 19.2 and Visual studio 2017).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are working on your issue internally and will get back to you soon.
Thanks and Regards,
Ditipriya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I can't reproduce your issue with icx 2022.0.0 and VS2019 16.11.11.
// source.cpp
#include <immintrin.h>
int main()
{
int NewErrors = _popcnt32(8);
return 0;
}
And I used command " icx source.cpp " to compile the source code, it worked successfully.
Please confirm the below information on your end,
Do you use the compiler icx? And please tell us the version you used, and please tell us the visual studio version of VS 2019 you used.
Could you try the above simple code? And check if it can be compiled successfully.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you for a long time so we are assuming that your issue has been fixed. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Thanks

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