Make class hidden from project

I have a dll project and many classes on it. It's something like that:

1
2
3
4
5
6
7
8
namespace x
{
   class A {};

   __declspec(dllexport) class B : public A {};

   __declspec(dllexport) class C : public A {};
}


When I export the library and import it on another project I see all the classes: x::A, x::B and x::C. But when I try to make an instance of the class A it give me an error: unknown identifier.
It's because I doesn't put __declspec(dllexport) declaration before the class A.
So is there any way to make A hidden from the project???
Or, I have to make a class witch contains all of them and set 'A' as a private class?
Last edited on
If the error is unknown identifier rather than some undefined reference, then it sounds like A is already hidden, since the compiler doesn't seem to understand what 'A' in new A is. What's probably happening is that your IDE's autocomplete function can see the other project and is suggesting types that aren't visible from the current project.
Last edited on
Topic archived. No new replies allowed.