How can I initialize a boost::function
object with a raw function pointer?
Metacode
extern "C"
{
class Library
{
...
};
Library* createLibrary();
}
...
void* functionPtr = library.GetFunction("createLibrary");
boost::function<Library*()> functionObj(functionPtr);
Library* libInstance = functionObj();
If you need additional information's just let me know.