Herby
2006-11-16 16:45:56 UTC
My MFC application links to an static MFC class lib of our own classes.
When this application de-serializes its unable to resolve certain
classes and i get the following error:
Warning: Cannot load CRuntimeMap from archive. Class not defined.
CArchive exception: badClass.
So its like because my app is linking to a lib, certain object files
are not being included.
For a while i resolved this problem by providing a dummy function like
the following
void Calculator::LinkLibError()
{
CPWArithObjData arith;
CPWFilterObjData filter;
}
This seemed to force the linker to include the correct obj files.
Suddenly its started doing it for a class that is referenced directly
so applying the above solution does not work.
Can anybody throw some light on the problem?
Why would the linker fail to include the files when they are
referenced?
How can I force them to be included?
Or why would the internals of Serialize fail to find the name of a
class that should be loaded?
Thanks.
When this application de-serializes its unable to resolve certain
classes and i get the following error:
Warning: Cannot load CRuntimeMap from archive. Class not defined.
CArchive exception: badClass.
So its like because my app is linking to a lib, certain object files
are not being included.
For a while i resolved this problem by providing a dummy function like
the following
void Calculator::LinkLibError()
{
CPWArithObjData arith;
CPWFilterObjData filter;
}
This seemed to force the linker to include the correct obj files.
Suddenly its started doing it for a class that is referenced directly
so applying the above solution does not work.
Can anybody throw some light on the problem?
Why would the linker fail to include the files when they are
referenced?
How can I force them to be included?
Or why would the internals of Serialize fail to find the name of a
class that should be loaded?
Thanks.