Boost logo

Boost :

From: Robert Dailey (rcdailey_at_[hidden])
Date: 2008-07-03 19:15:39


When calling load_single_library(), if the 3rd parameter, which is the
name of the export factory function, is incorrect,
load_single_library() will silently fail and return as if nothing went
wrong. However, since the name of that function was mistyped (in my
case), I had to debug into the boost.extensions library to figure out
the actual source of the problem. I think this should have thrown an
exception.

For example, I called the function like below:

factory_map fm;
load_single_library( fm, "my_library.dll", "my_export_method_typo" );

And my function, as defined in the DLL source, is as follows:

extern "C" void BOOST_EXTENSION_EXPORT_DECL
my_export_method( boost::extensions::factory_map& fm )
{
}

As you can see, the string (in the first code example) is clearly
mistyped/misnamed. This results in silent failure. Opinions on this
would be useful.


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