Thanks Robert,


2007/4/3, Robert Osfield <[EMAIL PROTECTED]>:

On 4/3/07, Adrian Egli <[EMAIL PROTECTED]> wrote:
> hi
>
> i like to implement for our application a plugin system. Which allows
user
> to implement their own plugins, dynamic libraries. I have some question
> (conceptionals):
>
> (1) If the user build against a elder OSG version, would the plugin
still
> run if we would change our OSG version, means the main application will
> change the version, the plugin not. we will pass
>      a pointer of osg::Node*. the node* is of version XXX.XXX.2   and
the
> plugin use version XXX.XXX.1 means an elder version. and the plugin just
> knows the elder interface, it sould run, or i am wrong?

Mixing plugins and libs from different versions of the OSG is not
safe.  Manage your lib paths carefully to avoid this.



Means my own plugin has to be recompiled after each update ? is that right ?




(2) under windows i can ask for a void* pointer to an function pointer,
with
> the handle and static name (string) is this a good choose, alos respect
to
> platform portability?
>
>      example :
>      ------------------------------------
>     HMODULE module = LoadLibrary(dll_name.c_str());
>     if ( module ){
>         void* addr = (void*)GetProcAddress( module, "createDLL" );
>         if ( addr ) {
>             // Def. function parameters
>             typedef void ( *CreateFn)( void* );
>             CreateFn pfnCreate = (CreateFn) addr;
>             pfnCreate(m_Object);
>         }
>     }

The OSG has osgDB/DynamcLibrary class for helping do cross platform
dynamic library management.


yes, i know that. I would like to know wether there is another better
function access than with the proc address? or is this the only technic.



Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to