Jump to content
  • Advertisement
Sign in to follow this  
kloffy

Unity [Py++] Error when including boost::shared_ptr

This topic is 3297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A while a go I was fiddling around with manually writing Boost Python wrappers. Being the lazy guy that I am, I wanted to try out Py++ for automatically generating such wrappers. For testing purposes, I created a header containing a single class and started playing around. Everything worked pretty well until I added a "#include <boost/smart_ptr.hpp>" statement. I got this error, which I haven't been able to get rid of so far:
Error occured during code generation process!
Error:
Error occured while running GCC-XML: In file included from C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xfwrap1:222,
                 from C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xfwrap:20,
                 from C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xrefwrap:44,
                 from C:/Program Files/Microsoft Visual Studio 9.0/VC/include/functional:874,
                 from C:/Program Files/boost/boost_1_39/boost/smart_ptr/detail/shared_count.hpp:37,
                 from C:/Program Files/boost/boost_1_39/boost/smart_ptr/shared_ptr.hpp:32,
                 from C:/Program Files/boost/boost_1_39/boost/shared_ptr.hpp:17,
                 from C:/Program Files/boost/boost_1_39/boost/smart_ptr.hpp:18,
                 from D:/Projects/PyTest/test.h:4:
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:102: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:94: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:111: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:94: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:121: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:94: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:154: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:146: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:163: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:146: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:173: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:146: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:206: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:198: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:215: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:198: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:225: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:198: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:258: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:250: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:267: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:250: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:277: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:250: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::*)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:310: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:302: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:319: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:302: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:329: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:302: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)(), _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:362: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:354: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:371: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:354: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:381: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:354: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:414: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:406: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:423: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:406: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:433: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:406: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:466: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:458: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:475: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:458: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:485: error: redefinition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const volatile, _Farg0&>'
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/xxresult:458: error: previous definition of 'struct std::tr1::_Result_of1<_Rx (_Arg0::* const)()const volatile, _Farg0&>'

I'm using boost 1.39 and I have downloaded Py++-1.0.0, pygccxml-1.0.0 and gccxml-0.9 from SourceForge. Any ideas what could be going on?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Page linked by mattd
I found out, that the source of errors is TR1 implementation.Passing
-D"_HAS_TR1=0" to gccxml.exe solves the problem.
...it sure does. Thank you, I bow before your superior Google skills!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!