-
-
Notifications
You must be signed in to change notification settings - Fork 945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OGRE-206] Hide threading header #47
Comments
[author="masterfalcon", created="Fri, 14 Jun 2013 22:47:33 +0200"] Does this resolve the issue for you? |
[author="ogre.transporter", created="Sat, 15 Jun 2013 10:50:00 +0200"] No: OgrePaging: RenderSystem_Direct3D9: |
[author="masterfalcon", created="Sat, 15 Jun 2013 18:47:04 +0200"] With the exception of build errors, does it resolve the core issue of header inclusion? |
[author="ogre.transporter", created="Sat, 15 Jun 2013 22:57:39 +0200"] No. Thanks for your effort! I've rebuilt Ogre without paging and DX9 succesfully. But there are more threading includes like Ogre.h -> OgreArchive.h -> OgreSharedPtr.h -> Threading/OgreThreadHeaders.h -> Threading/OgreThreadHeadersBoost.h -> BOOST |
[author="masterfalcon", created="Sun, 16 Jun 2013 03:41:29 +0200"] See, the problem there is that OgreSharedPtr.h and also OgreLog.h both use mutexes in their headers and need the thread defines, which in turn need the types that they are defining. I don't see any way around it at the moment. Do you have any ideas? |
[author="ogre.transporter", created="Sun, 16 Jun 2013 12:48:05 +0200"] You're right, this is a large problem. I think the only way is creating a mutex object which is wrapping the real mutex in code without loading boost through ist header file. Maybe we can collect additional suggestions in the forum. |
[author="masterfalcon", created="Sun, 23 Jun 2013 07:32:28 +0200"] Thanks to the work with |
[author="ogre.transporter", created="Fri, 24 Jul 2015 08:46:41 +0200"] A complete threading wrapper is required to hide boost/tbb headers from ogre include files. |
the preferred threading path is now std::thread - while not really solving the issue at hand, it makes it much less critical |
[reporter="Ogre.Transporter", created="Fri, 14 Jun 2013 22:12:38 +0200"]
It would be nice to hide the headers of threading dependencies. Have a look what happend after including Ogre.h:
Ogre.h -> OgrePrerequisites.h -> OgrePlatform.h -> OgreConfig.h -> OgreBuildSettings.h
Code: Select all#define OGRE_THREAD_SUPPORT 2
#define OGRE_THREAD_PROVIDER 1
Ogre.h -> OgrePrerequisites.h -> Threading/OgreThreadDefines.h -> Threading/OgreThreadDefinesBoost.h
Ogre.h -> OgrePrerequisites.h -> OgreStdHeaders.h -> Threading/OgreThreadHeaders.h -> Threading/OgreThreadHeadersBoost.h -> BOOST
That means you have to add boost to all Ogre projects. Even if you use Ogre as shared libraries, you also have to add boost. It would be helpful to include the threading libraries only in cpp code or headers which only used for building Ogre to avoid including any external library using the SDK. Using windows is also adding more issues because of boost auto linking, which is enabled by default.
Thread: http://www.ogre3d.org/forums/viewtopic.php?f=3&t=78190
Edit: It looks like that TBB has the same problem (https://bitbucket.org/transporter/ogre-procedural/issues/147/boost-and-tbb-headers-and-libraries-not)
The text was updated successfully, but these errors were encountered: