Hi all,
I'm currently making a dynamic lib for my application, and so I use the
osgDB::DynamicLibrary class to load the lib and find the Proc_adress but,
there are some points I would like to understand more :
1.
The osgDB::DynamicLibrary::PROC_ADDRESS is just a void* so to use the adress
as a function as expected, I need to cast it :
typedef int (*Pupdate) (const char* path, const char* id, bool
first_time);
Pupdate update;
update = (Pupdate) dll->getProcAddress("update");
If I do not cast, the compiler do not want to use a void* when I call the
function next...
It is the behavior/use you were expecting when writing this class ? or is
there someting else to use, avoiding the cast ...
A little precision : this code have to work on every osg supported
plateform. (win and linux at least)
2.
Next, I just have red a lot of code on osgDB, writers, plugins ... etc but I
didn't found the rela "connection" between the osgDB core and the plugins.
What I've understood is :
The core, using the file termination, load the DLL (if exists).
But the getProcAdress is never used ... so how did the core call the dll
read/write function without the ProcAdress ?
Any help would a very apreciated :-)
Thanks.
Regards,
Vincent.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org