Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2472 Discussions

Errors compiling TBB c++ include file concurrent_vector.h

craigpod
Beginner
268 Views

When I compile concurrent_vector.h in a small isolated windows 11 c++ console test project I don't have a problem. 

I'm using the latest release of Visual Studio Community edition and the latest release on oneAPI.

I'm getting the following error messages when i compile concurrent_vector.h in another application build in which i am trying to use the TBB function

1>C:\Program Files (x86)\Intel\oneAPI\tbb\2021.12\include\oneapi\tbb\concurrent_vector.h(488,21): error C2589: '(': illegal token on right side of '::'
1>C:\Program Files (x86)\Intel\oneAPI\tbb\2021.12\include\oneapi\tbb\concurrent_vector.h(488,16): error C2062: type 'unknown-type' unexpected
1>C:\Program Files (x86)\Intel\oneAPI\tbb\2021.12\include\oneapi\tbb\concurrent_vector.h(488,21): error C2059: syntax error: ')'

 

Here is the include sequence I'm using:

#include <oneapi/tbb.h>
#include <oneapi/tbb/parallel_for.h>
#include <blocked_range.h>
#include <concurrent_vector.h>

 

Please help.  Do i need to include something before concurrent_vector.h

Regards

Craig

0 Kudos
2 Replies
craigpod
Beginner
208 Views

I isolated the problem and found that the errors occur when I include <windows.h> above concurrent_vector.h

I can't remove windows.h from my build because too many other things rely on it.

I attached a cpp file with the code that should reproduce the problem.

Please suggest a work around to resolve this.

Thank you in advance for your help

Craig

0 Kudos
Mark_L_Intel
Moderator
187 Views

@craigpod, this looks like a potential bug. Please file a bug report (including reproducer) at  https://github.com/oneapi-src/oneTBB/issues

0 Kudos
Reply