
i'm having problems w/ vc6 and python.. i'm trying to compile examples\getting_started2.cpp and it compiles , but i get like 23 warnings, and when i throw the getting_started2.dll into the python syspath (specifically in C:\Python22\Lib\site-packages\ ) i get errors form the example\test_getting_started2.py what am i doing wrong? :/ here are the warnings : Compiling... getting_started2.cpp c:\libraries\include\boost\python\detail\types.hpp(37) : warning C4275: non dll-interface struct 'boost::python::detail::base_object<struct _typeobject>' used as base for dll-interface class 'boost::python::detail::type_object_base' c:\libraries\include\boost\python\detail\types.hpp(36) : see declaration of 'type_object_base' c:\libraries\include\boost\python\detail\types.hpp(389) : warning C4251: 'm_storage' : class 'std::vector<struct std::pair<char *,unsigned int>,class std::allocator<struct std::pair<char *,unsigned int> > >' needs to have dll-interface to be used by clients of class 'boost::python::detail::shared_pod_manager' c:\libraries\include\boost\python\objects.hpp(32) : warning C4251: 'm_p' : class 'boost::python::reference<struct _object>' needs to have dll-interface to be used by clients of class 'boost::python::object' c:\libraries\include\boost\python\objects.hpp(270) : warning C4251: 'm_dict' : class 'boost::python::reference<struct _object>' needs to have dll-interface to be used by clients of struct 'boost::python::dictionary_proxy' c:\libraries\include\boost\python\objects.hpp(271) : warning C4251: 'm_key' : class 'boost::python::reference<struct _object>' needs to have dll-interface to be used by clients of struct 'boost::python::dictionary_proxy' c:\libraries\include\boost\python\objects.hpp(336) : warning C4251: 'm_list' : class 'boost::python::list' needs to have dll-interface to be used by clients of struct 'boost::python::list_proxy' c:\libraries\include\boost\python\objects.hpp(146) : see declaration of 'list' c:\libraries\include\boost\python\objects.hpp(351) : warning C4251: 'm_list' : class 'boost::python::reference<struct _object>' needs to have dll-interface to be used by clients of struct 'boost::python::list_slice_proxy' c:\libraries\include\boost\python\classes.hpp(25) : warning C4275: non dll-interface struct 'boost::python::detail::base_object<struct _object>' used as base for dll-interface class 'boost::python::instance' c:\libraries\include\boost\python\classes.hpp(24) : see declaration of 'instance' c:\libraries\include\boost\python\classes.hpp(102) : warning C4251: 'm_name_space' : class 'boost::python::dictionary' needs to have dll-interface to be used by clients of class 'boost::python::instance' c:\libraries\include\boost\python\objects.hpp(274) : see declaration of 'dictionary' c:\libraries\include\boost\python\classes.hpp(138) : warning C4251: 'm_bases' : class 'boost::python::tuple' needs to have dll-interface to be used by clients of class 'boost::python::detail::class_base' c:\libraries\include\boost\python\objects.hpp(56) : see declaration of 'tuple' c:\libraries\include\boost\python\classes.hpp(139) : warning C4251: 'm_name_space' : class 'boost::python::dictionary' needs to have dll-interface to be used by clients of class 'boost::python::detail::class_base' c:\libraries\include\boost\python\objects.hpp(274) : see declaration of 'dictionary' c:\libraries\include\boost\python\detail\functions.hpp(33) : warning C4275: non dll-interface struct 'boost::python::detail::base_object<struct _object>' used as base for dll-interface class 'boost::python::detail::function' c:\libraries\include\boost\python\detail\functions.hpp(32) : see declaration of 'function' c:\libraries\include\boost\python\detail\functions.hpp(49) : warning C4251: 'm_overloads' : class 'boost::python::reference<class boost::python::detail::function>' needs to have dll-interface to be used by clients of class 'boost::python::detail::fu nction' c:\libraries\include\boost\python\detail\functions.hpp(205) : warning C4275: non dll-interface struct 'boost::python::detail::base_object<struct _object>' used as base for dll-interface class 'boost::python::detail::bound_function' c:\libraries\include\boost\python\detail\functions.hpp(204) : see declaration of 'bound_function' c:\libraries\include\boost\python\detail\functions.hpp(217) : warning C4251: 'm_target' : class 'boost::python::reference<struct _object>' needs to have dll-interface to be used by clients of class 'boost::python::detail::bound_function' c:\libraries\include\boost\python\detail\functions.hpp(218) : warning C4251: 'm_unbound_function' : class 'boost::python::reference<struct _object>' needs to have dll-interface to be used by clients of class 'boost::python::detail::bound_function' c:\libraries\include\boost\python\detail\extension_class.hpp(68) : warning C4251: 'm_wrapped_objects' : class 'std::vector<class boost::python::detail::instance_holder_base *,class std::allocator<class boost::python::detail::instance_holder_base *>
' needs to have dll-interface to be used by clients of class 'boost::python::detail::extension_instance' c:\libraries\include\boost\python\detail\extension_class.hpp(73) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation c:\libraries\include\boost\python\detail\extension_class.hpp(74) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation c:\libraries\include\boost\python\classes.hpp(234) : warning C4275: non dll-interface class 'boost::python::detail::reprable<class boost::python::detail::callable<class boost::python::detail::getattrable<class boost::python::detail::setattrable<clas s boost::python::detail::type_object<class boost::python::class_t<class boost::python::detail::extension_instance> > > > > >' used as base for dll-interface class 'boost::python::meta_class<class boost::python::detail::extension_instance>'
c:\libraries\include\boost\python\detail\extension_class.hpp(74) : see reference to class template instantiation 'boost::python::meta_class<class boost::python::detail::extension_instance>' being compiled c:\libraries\include\boost\python\classes.hpp(236) : warning C4275: non dll-interface class 'boost::noncopyable' used as base for dll-interface class 'boost::python::meta_class<class boost::python::detail::extension_instance>' c:\libraries\include\boost\utility.hpp(50) : see declaration of 'noncopyable' c:\libraries\include\boost\python\detail\extension_class.hpp(74) : see reference to class template instantiation 'boost::python::meta_class<class boost::python::detail::extension_instance>' being compiled c:\libraries\include\boost\python\detail\extension_class.hpp(937) : warning C4541: 'dynamic_cast' used on polymorphic type 'class boost::python::detail::instance_holder_base' with /GR-; unpredictable behavior may result c:\program files\microsoft visual studio 6.0\vc98\include\xmemory(59) : while compiling class-template member function 'void *__thiscall boost::python::detail::extension_class<class `anonymous namespace'::hello,class boost::python::detail::h eld_instance<class `anonymous namespace'::hello>
::extract_object_from_holder(class boost::python::detail::instance_holder_base *) const' c:\libraries\include\boost\python\detail\extension_class.hpp(248) : warning C4541: 'dynamic_cast' used on polymorphic type 'class boost::python::detail::instance_holder_base' with /GR-; unpredictable behavior may result
c:\libraries\include\boost\python\detail\extension_class.hpp(241) : while compiling class-template member function 'class `anonymous-namespace'::hello *__cdecl boost::python::python_extension_class_converters<class `anonymous namespace'::hel lo,class boost::python::detail::held_instance<class `anonymous namespace'::hello>
::non_null_from_python(struct _object *,struct boost::python::type<class `anonymous namespace'::hello *>)' Linking... Creating library Debug/getting_started2.lib and object Debug/getting_started2.exp
getting_started2.dll - 0 error(s), 23 warning(s) then when i run test_getting_started2.py , these are the errors i get : C:\Downloads\boost_1_28_0\libs\python\example>test_getting_started2.py ***************************************************************** Failure in example: hi.greet() from line #2 of test_getting_started2 Exception raised: Traceback (most recent call last): File "C:\Python22\lib\doctest.py", line 430, in _run_examples_inner compileflags, 1) in globs File "<string>", line 1, in ? RuntimeError: Access violation - no RTTI data! ***************************************************************** Failure in example: invite(hi) from line #4 of test_getting_started2 Exception raised: Traceback (most recent call last): File "C:\Python22\lib\doctest.py", line 430, in _run_examples_inner compileflags, 1) in globs File "<string>", line 1, in ? RuntimeError: Access violation - no RTTI data! ***************************************************************** Failure in example: hi.invite() from line #6 of test_getting_started2 Exception raised: Traceback (most recent call last): File "C:\Python22\lib\doctest.py", line 430, in _run_examples_inner compileflags, 1) in globs File "<string>", line 1, in ? RuntimeError: Access violation - no RTTI data! ***************************************************************** Failure in example: hi2.greet() from line #14 of test_getting_started2 Exception raised: Traceback (most recent call last): File "C:\Python22\lib\doctest.py", line 430, in _run_examples_inner compileflags, 1) in globs File "<string>", line 1, in ? File "<string>", line 3, in greet RuntimeError: Access violation - no RTTI data! ***************************************************************** Failure in example: invite(hi2) from line #16 of test_getting_started2 Exception raised: Traceback (most recent call last): File "C:\Python22\lib\doctest.py", line 430, in _run_examples_inner compileflags, 1) in globs File "<string>", line 1, in ? RuntimeError: Access violation - no RTTI data! C:\Downloads\boost_1_28_0\libs\python\example> --- as you can see, i'm using boost 1.28.0 can anyone tell me what i'm doing wrong? this has been driving me *INSANE* .. :/ __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com

"srivatsan raghavan" <machinshin2002@yahoo.com> wrote in message news:20020715202657.76586.qmail@web20209.mail.yahoo.com...
i'm having problems w/ vc6 and python.. i'm trying to compile examples\getting_started2.cpp and it compiles , but i get like 23 warnings, and when i throw the getting_started2.dll into the python syspath (specifically in C:\Python22\Lib\site-packages\ ) i get errors form the example\test_getting_started2.py
what am i doing wrong? :/
Looks to me as though instead of following the instructions at www.boost.org/libs/python/doc/building.html you are trying to build some other way. If you need to use some other build system, try it first with "bjam -d+2 ...", examine the command-lines generated by Boost.Build, and ensure that your build system is passing the same options to the compiler and linker. ---
as you can see, i'm using boost 1.28.0 can anyone tell me what i'm doing wrong? this has been driving me *INSANE* .. :/
Just follow the directions and your sanity will return. HTH, Dave

Looks to me as though instead of following the instructions at www.boost.org/libs/python/doc/building.html you are trying to build some other way.
actually, my problems weren't in building boost::python but in building my extension module, i had forgotten to turn on RTTI compilation.. stupid me, the errors are gone now, as are most of the warnings , and the examples work properly
---
as you can see, i'm using boost 1.28.0 can anyone tell me what i'm doing wrong? this has been driving me *INSANE* .. :/
Just follow the directions and your sanity will return.
HTH, Dave hehe, thanks.. my sanity's more or less returned to where it was before (although i think it was always a bit close to the border :P )
--vat __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com
participants (2)
-
David Abrahams
-
srivatsan raghavan