Boost logo

Boost Users :

Subject: [Boost-users] gcc refuses to compile Boost.Extension example
From: René Tschirley (Rene.Tschirley_at_[hidden])
Date: 2010-09-01 05:11:10


Dear Boost experts,

I struggle to get Jeremy Pack's Boost.Extension going. I want to use the platform
independent way to explicitly load shared libraries. Starting with the tutorial,
it took me some time to find this out:

        boost::extensions::shared_library lib("mylib.dll");
        boost::function<void (int)> fun1(lib.get<void, int>("DoSomething"));

works, but

        boost::function<void (void)> fun2(lib.get<void, void>("DoSomething"));

does not work as the compiler (Eclipse CDT Helios using gcc 4.4.0 on Windows with MinGW) complains:

        somefile.cpp:74: error:
                no matching function for call to 'boost::extensions::shared_library::get(const char [12])'

I'm a bit confused. Am I blind? Is this a bug? Weird feature? User-too-dumb-error?

Sincerely,
Rene


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net