R6025 Error Plz help me

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
neppyweb
Posts: 22
Joined: Thu Nov 23, 2006 12:44 pm

R6025 Error Plz help me

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
neppyweb
Posts: 22
Joined: Thu Nov 23, 2006 12:44 pm

Post by neppyweb »

I try but It does not work it sill appear
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Maybe you use two different include directories.
neppyweb
Posts: 22
Joined: Thu Nov 23, 2006 12:44 pm

Post by neppyweb »

so I should combine the libraries?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Huh?
Warchief
Posts: 204
Joined: Tue Nov 22, 2005 10:58 am

Post 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>
Last edited by Warchief on Thu Feb 15, 2007 6:24 pm, edited 1 time in total.
Warchief's Warboard 3D Now hotseat release
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post 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).
Warchief
Posts: 204
Joined: Tue Nov 22, 2005 10:58 am

Post 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.
Warchief's Warboard 3D Now hotseat release
Warchief
Posts: 204
Joined: Tue Nov 22, 2005 10:58 am

Post by Warchief »

By the way i modified the code example because it may happen within the constructor as well as within the destructor.
Warchief's Warboard 3D Now hotseat release
Post Reply