B
Bob Bamberg
Hello All,
I have been trying without luck to get some information on debugging
the Runtime Error R6025 - Pure Virtual Function Call. I am working in
C++ and have only one class that is derived from an Abstract class, I
do not believe that this class object is causing me my problem. Below
is that message I have posted before to other groups.
Question:
I am experiencing a Runtime Error R6025 - Pure Virtual Function Call
in an application I have written. I am trying to figure out what it
is that could be causing this error. I have searched Google Groups
for other posting that discuss the R6025 Error, and read many of them.
From what I can tell, this type of error is caused by an undefined or
unhandled virtual function call that a class object must define when
inheriting from an abstract class. Additionally I have read that this
error most offen occurrs during object construction due to a virtual
function being called before the object has been completely created.
This is not my error, I am 99.999% sure of that.
Rather than ask you all to read my own code to help me find my bug, I
was wondering if anyone could advise to me a good way of debugging
this type of error.
The most promising post I found on Google Groups for debugging such an
error discusses a process of redefining or linking with the function
"void __cdecl purecall(void)" from the C Runtime Library source file
PUREVIRT.C.
I first tried to define this function within my own project, and
putting a breakpoint inside my function definition which would allow
me to view the call stack. Unfortunately, this version of the
function in my own project never gets called. This makes me think
that the problem is somewhere else in Windows and not my own source.
Does this make sense to anyone?
I next attempted to add the line: #include "purevirt.c" in my source,
and adding the ..\VC98\CRT\SRC directory to my
Tools->Options->Directories->Include path of Visual Studio.
Attempting to build my project gives me the error "C2556 - Overloaded
function differs in return type".
Next I tried to add the PUREVIRT.C file directly to my project. This
gave me a host of linker errors including not being able to find my
main() function. Does anyone know what is it that I am doing wrong
trying to trap on the _purecall() to view the function stack? It
appears to me that this method is for use with standard C proramming
not C++, hence the undefined main() linker error.
If anyone follows my question and can give me advise on figuring out
where my error is occurring you would make my day. I have been going
batty trying to figure this out. Does my approach of trying to trap
the _purecall() function make sense since I am programming in C++? Is
there another way around debugging this type of error?
Any help is greatly appreciated, even if its just to tell me that I
have posted my message on the wrong message board. If this is true
however, please advise the best Google Group for answering this type
of question.
Thank You,
Bob Bamberg
I have been trying without luck to get some information on debugging
the Runtime Error R6025 - Pure Virtual Function Call. I am working in
C++ and have only one class that is derived from an Abstract class, I
do not believe that this class object is causing me my problem. Below
is that message I have posted before to other groups.
Question:
I am experiencing a Runtime Error R6025 - Pure Virtual Function Call
in an application I have written. I am trying to figure out what it
is that could be causing this error. I have searched Google Groups
for other posting that discuss the R6025 Error, and read many of them.
From what I can tell, this type of error is caused by an undefined or
unhandled virtual function call that a class object must define when
inheriting from an abstract class. Additionally I have read that this
error most offen occurrs during object construction due to a virtual
function being called before the object has been completely created.
This is not my error, I am 99.999% sure of that.
Rather than ask you all to read my own code to help me find my bug, I
was wondering if anyone could advise to me a good way of debugging
this type of error.
The most promising post I found on Google Groups for debugging such an
error discusses a process of redefining or linking with the function
"void __cdecl purecall(void)" from the C Runtime Library source file
PUREVIRT.C.
I first tried to define this function within my own project, and
putting a breakpoint inside my function definition which would allow
me to view the call stack. Unfortunately, this version of the
function in my own project never gets called. This makes me think
that the problem is somewhere else in Windows and not my own source.
Does this make sense to anyone?
I next attempted to add the line: #include "purevirt.c" in my source,
and adding the ..\VC98\CRT\SRC directory to my
Tools->Options->Directories->Include path of Visual Studio.
Attempting to build my project gives me the error "C2556 - Overloaded
function differs in return type".
Next I tried to add the PUREVIRT.C file directly to my project. This
gave me a host of linker errors including not being able to find my
main() function. Does anyone know what is it that I am doing wrong
trying to trap on the _purecall() to view the function stack? It
appears to me that this method is for use with standard C proramming
not C++, hence the undefined main() linker error.
If anyone follows my question and can give me advise on figuring out
where my error is occurring you would make my day. I have been going
batty trying to figure this out. Does my approach of trying to trap
the _purecall() function make sense since I am programming in C++? Is
there another way around debugging this type of error?
Any help is greatly appreciated, even if its just to tell me that I
have posted my message on the wrong message board. If this is true
however, please advise the best Google Group for answering this type
of question.
Thank You,
Bob Bamberg