Page 1 of 1

R6025 Error Plz help me

Posted: Wed Feb 14, 2007 7:25 am
by neppyweb
When I complie program it show this arguement

"R6025 - Pure virtual function call"

How can I solve this error

Pleae help me.

Thx a million.

Posted: Wed Feb 14, 2007 8:29 am
by hybrid
Recompile all files, i.e. your app as well as the library. This is due to changes in header files which are not refelcted in all object files.

Posted: Wed Feb 14, 2007 8:36 am
by neppyweb
I try but It does not work it sill appear

Posted: Wed Feb 14, 2007 1:06 pm
by hybrid
Maybe you use two different include directories.

Posted: Wed Feb 14, 2007 4:10 pm
by neppyweb
so I should combine the libraries?

Posted: Wed Feb 14, 2007 5:11 pm
by hybrid
Huh?

Posted: Wed Feb 14, 2007 6:37 pm
by Warchief
This happens when you call a pure virtual method from a base class destructor/constructor. Check your code.

Example:

Code: Select all

class MyBaseClass {
public:
   // Constructor calling virtual pure method
   MyBaseClass() {
      Init();
   }

   // Destructor calling virtual pure method
   virtual ~MyBaseClass() {
      Release();
   }

   // The pure virtual method
   virtual void Init() = 0;

   // The pure virtual method
   virtual void Release() = 0;
}

class SomeClass : public MyBaseClass {
    void Init() {
      // Some code
    }
    void Release() {
      // Some code
    }
}
<edit> Btw some solutions:
  • Do not call the method from constructor/destructor
  • Give an empty code to the virtual pure method on the base class
</edit>

Posted: Wed Feb 14, 2007 6:57 pm
by sio2
neppyweb wrote:I try but It does not work it sill appear
This has happened to me when I recompiled Irrlicht but forget to copy the new dll to where I need it (my demos are all self-contained).

Posted: Wed Feb 14, 2007 7:01 pm
by Warchief
Think the error you guys talk about is the one that reads:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

Posted: Thu Feb 15, 2007 6:25 pm
by Warchief
By the way i modified the code example because it may happen within the constructor as well as within the destructor.