Problem linking with a MFC DLL - enresolved external error
Hi!
I have a MFC DLL named SERVICES.DLL which contains
several classes, some of them visible to the outside world using AFX_EXT_CLASS.
I have another DLL named LAND.DLL which uses
some of the exposed classes of SERVICES.DLL.
This DLL also exposes classes via AFX_EXT_CLASS.
The problem is that I can't link LAND.DLL - I get
an error message saying "Unresolved External...Cxxx():~Cxxx()" where Cxxx is a class
from SERVICES.DLL that IS NOT EXPORTED using
AFX_EXT_CLASS.
When I use AFX_EXT_CLASS on Cxxx everything
works OK ( - but I don't want to expose Cxxx :-< )
Any suggestions??
Regards,
Eyal.
Re: Problem linking with a MFC DLL - enresolved external error
No, u will not be able to use class from SERVICES.DLL in LAND.DLL
unless it is exported.
If possible move your class to LAND.DLL and then u won't face this problem.
Re: Problem linking with a MFC DLL - enresolved external error
Maby I wasn't clear enough...
I DON'T use the Cxxx class in the LAND.DLL!
(another class uses it internally)
The problem does not occur if I use SERVICES.DLL
directly from my app - only when I'm using it
from another DLL!
Eyal.
Re: Problem linking with a MFC DLL - enresolved external error
I've found that this error occurs most often when the header file for the internal class is inadvertently included in the header of the class with the AFX_EXT_CLASS macro. Try moving headers to CPP files where possible.
A shot in the dark, but I hope it helps.
- Anonymous :-)