Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting class from dll with nested class

Status
Not open for further replies.

mtrudeau

Technical User
Apr 30, 2004
1
0
0
CA
Hi. I'm trying to compile a dll. I'm exporting a class (called 'B') from it that contains as private data an instance (called A_object) of another class (called 'A')that is not exported.

Why do I get a warning C4251: 'A_object' : class 'A' needs to have dll-interface to be used by clients of class 'B' ?

Since the data is private, it will be invisible to any class derived from B. And any instance of class B in an .exe won't have problems using methods of B that call methods of A. I just don't see where the limitation could be...
 
Is just a warning. In your case you may ignore it. In some cases your nested class could be used explicitly or implicitly by other modules, that is why you get this warning.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top