Boost logo

Boost :

From: Bernhard Glück (gluber_at_[hidden])
Date: 2001-07-09 16:12:54


Hi !

I have a little problem with the boost::python lib.
In my game engine I allow others to write DLL plugins. There they can derive
from the "Object" base class and define new objects for the game this way.
All object classes should also be exported to python (which is the scripting
language for the engine) So the main "engine.dll" exports the basic object
class to python and creates a module for the whole engine. In the plugins
the coder can query the Module and the ClassBuilder for the "Object" base
class like this:

class_builder<Object> * ScriptEngine()->GetObjectBase();

module_builder * ScriptEngine()->GetModule()

So in a plugin the code could write this:

class_builder<MyPluginClassDerivedfromObject>
mp(*ScriptEgine()->GetModule(),"mypluginclass");
mp.declare_base(*ScriptEngine()->GetObjectBase);

Ok the problem: This does not work plugin classes are not recognized as
classes derived from "Object" so all script functions taking an Object as
Parameter don't work with the plugin classes.

I came across the section in the manual about "Cross Module dependencies"
and tried to export_convertors_noncopyable(object_class); etc and the
corresponding import_convertors in the plugin modules. I think that should
be the solution for my problem.. But now i always get one unresolved
external which I cannot fix... Maybe it rings a bell to anyone of you :

ScriptEngine.obj : error LNK2001: unresolved external symbol "char const *
const boost::python::detail::converters_attribute_name"
(?converters_attribute_name_at_detail@python_at_boost@@3PBDB)

Is there something I am missing out to export the convertors ? Or maybe this
isn't really the solution to my problem anyways...... I hope anyone can help
me,

Thanks in advance
Bernhard Glück


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk