Some problems with TBB + VS 2012
Posted: Fri Dec 28, 2012 1:56 pm
Hey, compiling Ogre 1.9 with TBB on VS 2012, I came across some problems. I'll describe them here.
Firstly, Ogre's CMake won't find the latest TBB libs for Visual C++ 11. I fixed this by adding
to line 63 in FindTBB.cmake, simple enough.
Secondly, nedmalloc's malloc.h header, for some ungodly reason, does this:
on line 500. This screws up TBB's _tbb_windef.h, which requires _WIN32_WINNT to be 0x0501 or newer.
I fixed this by removing the offending line from nedmalloc. No external headers, in my opinion, should ever touch the winapi version defines.
Third, OgreVolumeChunk.cpp is missing a semicolon after OGRE_THREAD_SLEEP(0) on line 256.
I fixed this by adding the semicolon there. I'm not sure if it should go to OgreThreadDefinesTBB.h instead, but at least I got Ogre compiled this way.
Firstly, Ogre's CMake won't find the latest TBB libs for Visual C++ 11. I fixed this by adding
Code: Select all
if (MSVC_VERSION EQUAL 1700)
set(COMPILER_PREFIX "vc11")
endif ()Secondly, nedmalloc's malloc.h header, for some ungodly reason, does this:
Code: Select all
#define _WIN32_WINNT 0x403I fixed this by removing the offending line from nedmalloc. No external headers, in my opinion, should ever touch the winapi version defines.
Third, OgreVolumeChunk.cpp is missing a semicolon after OGRE_THREAD_SLEEP(0) on line 256.
I fixed this by adding the semicolon there. I'm not sure if it should go to OgreThreadDefinesTBB.h instead, but at least I got Ogre compiled this way.