Albrecht Fritzsche
07-19-2000, 10:29 AM
Having in a dll project header
#ifdef SHAPE_EXPORTS
#define SHAPE_API __declspec(dllexport)
#else
#define SHAPE_API __declspec(dllimport)
#endif
class SHAPE_API ShapeMaker
{
protected:
typedef std::map<std::string, ShapeMaker*> MakerMap;
static MakerMap registry;
....
};
I receive the following error (my own translation from the german output)
error C2491: 'ShapeMaker::registry'
"definition of static data for dllimport not allowed"
Hence my question - is it not possible to import classes with static data
members into an application?
Thanks for your help
Ali
#ifdef SHAPE_EXPORTS
#define SHAPE_API __declspec(dllexport)
#else
#define SHAPE_API __declspec(dllimport)
#endif
class SHAPE_API ShapeMaker
{
protected:
typedef std::map<std::string, ShapeMaker*> MakerMap;
static MakerMap registry;
....
};
I receive the following error (my own translation from the german output)
error C2491: 'ShapeMaker::registry'
"definition of static data for dllimport not allowed"
Hence my question - is it not possible to import classes with static data
members into an application?
Thanks for your help
Ali