Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
2421 Discussions

problem building OpenCV with TBB on Windows MSVC 2005

frares
Beginner
315 Views
Hi

I have successfully built OpenCV using the CMake generated makefiles for MinGW tools (GCC 4.4) using Intel's TBB (Thread Building Blocks), which was also successfully built under those conditions.

But now, trying to build OpenCV using the CMake generated solution and project files for MS Visual Studio 2005, it fails with this error messages:

c:\\tbb30_018oss\\include\\tbb\\
critical_section.h(109) : error C3861: 'TryEnterCriticalSection': identifier not found
c:\\tbb30_018oss\\include\\tbb\\mutex.h(185) : error C3861: 'TryEnterCriticalSection': identifier not found
c:\\tbb30_018oss\\include\\tbb\\recursive_mutex.h(192) : error C3861: 'TryEnterCriticalSection': identifier not found

TBB was successfully built using VS 2005. I guess that I am missing something, but could not find the point.

Thanks
Francisco
--
"If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have one idea and we exchange these ideas, then each of us will have two ideas." - George Bernard Shaw
0 Kudos
4 Replies
Vladimir_P_Intel2
315 Views
might it be that you redefine _WIN32_WINNT macro?
--Vladimir
jose-maria-gomez-ver
315 Views
That happened to me in Release mode. What you must do is to define this _WIN32_WINNT=0x0400.

You can do in two different ways.

In code, at the very beguining you can put this:

#ifndef _WIN32_WINNT
#define _WIN32_WINNT=0x0400
#endif

But in fact, you only need this in release mode, so what I do is to put that simbol in the project properties.

For Release do:
Project Property -> C/C++ -> Preprocesor -> Preprocesor definitions
There.. you need to add _WIN32_WINNT=0x0400

Not blank spaces near =
frares
Beginner
315 Views
Thanks a lot, gonna try this as soon as possible.

Francisco
frares
Beginner
315 Views
That worked perfectly! Thanks a lot!!!!

Sorry for the delay, business travel.

Francisco
Reply