Hello,
I need some help with my current project. Our idea was to create a main shared library (DLL) that provides a couple of commonly used classes, like abstract file handling. These would then be imported by various other shared libraries, e.g. to load a file.
Now for the classes to be used in other libraries, you have to DLLEXPORT each of them. And there's the problem:
Code:
class DLLEXPORT NSNamespace : public NSObjectData {
typedef class DLLEXPORT std::map<std::string, NSObject> MemberList;
MemberList m_members;
public:
// some more code follows down here
};
Exporting this class does not work, because upon exporting a class, you have to make sure that all other classes you're using in that class are exported, too. Now MemberList is a template, and std::map internally uses std::tree. What happens is that VC++ refuses to export NSNamespace because I haven't exported the std::tree class that was built out of the template. Well, I simply can't export that class, I do not have any access to it as it's created upon compile time.
Is there any chance to export that class without moving the whole stuff into a static library? Perhaps there's some compiler switch which exports all symbols in a library (that would be perfectly fine)?