You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to include the oneTBB in the Qt Project. I downloaded the package from Intel and installed it in my computer.
When I try to #include"oneapi/tbb.h", it shows errors
Version
2022.0.0
Environment
OS name and version: Windows 11
Compiler version: MSVC2019 64bit
Build errors:
C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared/rpcndr.h::203::-1">C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\rpcndr.h(203): error C2872: 'byte': ambiguous symbol
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\rpcndr.h(202): note: could be 'unsigned char byte'
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include/cstddef::28::-1">C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstddef(28): note: or 'std::byte'
The text was updated successfully, but these errors were encountered:
Thank you for reporting this, @tungdsefastec! OneTBB has Windows-specific declarations that require inclusion of Windows headers. What you reported is a known issue with Windows headers, e.g., discussed here: https://developercommunity.visualstudio.com/t/93889. The link above also mentions several workarounds:
include tbb.h (and thus the Windows headers) first (or at least before the code that specifies using namespace std)
Summary
I try to include the oneTBB in the Qt Project. I downloaded the package from Intel and installed it in my computer.
When I try to #include"oneapi/tbb.h", it shows errors
Version
2022.0.0
Environment
Build errors:
C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared/rpcndr.h::203::-1">C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\rpcndr.h(203): error C2872: 'byte': ambiguous symbol
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\rpcndr.h(202): note: could be 'unsigned char byte'
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include/cstddef::28::-1">C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstddef(28): note: or 'std::byte'
The text was updated successfully, but these errors were encountered: