1

I have ogre rendering code which compiles with c++03 but not with c++11.

I have bullet physics code which compiles with c++11 but not with c++03.

Now I want to interface them. Is it possible to compile bullet code with c++11 and call the resulting library from ogre code that is to be compiled with c++03.

my gcc version 4.8.4

OGRE is built as static. Bullet is also build as static.

Ben
  • 2,314
  • 1
  • 19
  • 36
user27665
  • 673
  • 7
  • 27
  • Will the Bullet library be built as a static or shared library? If it's a shared library then then it should work mostly fine, unless you want to call some function or use some class that depends on specific C++11 functionality. If it's a static library then it will not be possible unless you link with a standard library that have the C++11 functionality needed by the library. – Some programmer dude Jun 20 '16 at 11:15
  • please see edit above – user27665 Jun 20 '16 at 14:23

1 Answers1

1

Yes, it's possible as long as you use the same libstdc++ ABI, and as the new C++ 11 ABI has been introduced with g++ 5.1 (see using dual abi), it should be ok for you.

edit : see this answer for a more complete answer, specially regarding ABI incompatibility with g++ 4.7.0 and g++ 4.7.1

Community
  • 1
  • 1
URaoul
  • 523
  • 3
  • 13