Boost logo

Boost Users :

From: David Matz (david.matz_at_[hidden])
Date: 2008-04-16 13:08:46


Hello,

I have some trouble using boost::extension and boost::optional together in a
project (MSVC 7.1). The compiler complains that boost::get is not an element of
extensions::shared_library. Without the optional.hpp header everything works
fine. It seems the for some reason the macro
BOOST_EXTENSION_SHARED_LIBRARY_GET_FUNCTION isn't valid when
shared_library.get<>() is called but I can't find out why.

A small code snippet that reproduces the error

file: test_extension_and_optional.cpp

#include <boost/optional/optional.hpp> // included for some reason
#include <boost/extension/shared_library.hpp>
#include <boost/extension/convenience.hpp> // load_single_library

void loadExtension () {
        boost::extensions::factory_map fm;
        // we don't need the following line to produce the compiler error
        //boost::extensions::load_single_library(fm, ".", "external_function_name");
}

error: error C2039: 'boost::get': Ist kein Element von
'boost::extensions::shared_library'

Thanks in advance.

David

-- 
David Matz
----------------------------
Software Developer
Spatial View GmbH
mail:  david.matz_at_[hidden]
phone: +49 351 - 4 50 33 44
registration court: Amtsgericht Dresden, HRB 21104
managing directors: Wolfgang Opel, Jens Wiegrebe

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