Some problems with TBB + VS 2012

Minor issues with the Ogre API that can be trivial to fix
Post Reply
noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland
x 3

Some problems with TBB + VS 2012

Post by noorus »

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

Code: Select all

  if (MSVC_VERSION EQUAL 1700)
    set(COMPILER_PREFIX "vc11")
  endif ()
to line 63 in FindTBB.cmake, simple enough.

Secondly, nedmalloc's malloc.h header, for some ungodly reason, does this:

Code: Select all

#define _WIN32_WINNT 0x403
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.
Creator of Nice Input Library, for your advanced input needs.
Image
noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland
x 3

Re: Some problems with TBB + VS 2012

Post by noorus »

Added to bugtracker with patch: https://ogre3d.atlassian.net/browse/OGRE-119
Creator of Nice Input Library, for your advanced input needs.
Image
Nodrev
Gremlin
Posts: 193
Joined: Fri Jan 25, 2008 6:55 pm
Location: Nantes / France
x 17

Re: Some problems with TBB + VS 2012

Post by Nodrev »

I confirm that I had to remove "#define _WIN32_WINNT 0x403" too to make Ogre work with Tbb.
Post Reply