Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-12-14 20:00:33


At 07:28 PM 12/13/2001, mfdylan wrote:

>For anyone interested I added shared_object.zip to files which is
>basically a very thin class wrapper for shared object usage, with
>support for Win32 (LoadLibrary etc) and POSIX (dlopen etc).
>Obviously I can't do anything to make it truly typesafe as such, but
>at least it prevents the need for ugly casts in your code.
>dlopen/GetProcAddress assumes sizeof(void*) == sizeof(object_type*)
>so obviously you may not be able to use it with certain pointers to
>members (not recommended anyway!).

I'm certainly interested, but know nothing about shared libraries.

Could you explain what they are good for and what they aren't good for?

Are they really as type unsafe as you indicate above? Don't programmers
get confused and make mistakes regularly?

Why do you call the class shared_object? Can the shared object really be a
C++ object, or is it limited to a free function?

Is it really as simple as your code would seem to indicate?

--Beman


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