Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kacper_K_
Beginner
50 Views

Compile errors on Clang-C2

I am unable to #include <tbb/tbb.h> when compiling with Clang-C2 (Clang with microsoft code-gen) on windows.  I get a multiple errors.  I suspect these errors are most likely due to incorrect platform recognition.  I do not however, get the same errors when compiling with llvm-clang on windows, or any other compiler on windows or linux.


As clang-C2 is far better supported and feature complete it is my only option for clang usage on windows.

Has anyone encountered such an issue before, and if so is there a quick work around?  I am on the latest stable version of tbb interface version 9103.

Here is a sample of the compile errors I see:

 In file included from stdafx.cpp:5:
1>         In file included from ./stdafx.h:70:
1>         In file included from ..\..\tbb44\include\tbb/tbb.h:41:
1>         In file included from ..\..\tbb44\include\tbb/combinable.h:24:
1>         In file included from ..\..\tbb44\include\tbb/enumerable_thread_specific.h:26:
1>         In file included from ..\..\tbb44\include\tbb/tbb_thread.h:27:
1>         In file included from ..\..\tbb44\include\tbb/machine/windows_api.h:26:
1>         In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um\windows.h:214:
1>         In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um\ole2.h:37:
1>         In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um\objbase.h:27:
1>     1>
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um\combaseapi.h(234,21): error : unknown type name 'IUnknown'
1>                 static_cast<IUnknown*>(*pp);    // make sure everyone derives from IUnknown
1>                             ^
1>         In file included from stdafx.cpp:5:
1>         In file included from ./stdafx.h:70:
1>         In file included from ..\..\tbb44\include\tbb/tbb.h:53:
1>         In file included from ..\..\tbb44\include\tbb/flow_graph.h:30:
1>     1>
1>..\..\tbb44\include\tbb/task.h(331,23): error : enumerator value evaluates to 4294901760, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
1>                 traits_mask = 0xFFFFul << traits_offset
1>                               ^

 

0 Kudos
0 Replies
Reply