Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8622861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:09:12+00:00 2026-06-12T07:09:12+00:00

Base class has incomplete type What exactly does this error mean and how can

  • 0

Base class has incomplete type

What exactly does this error mean and how can I fix it? I have tried forward declaring the class by doing class Entity in my EntityPhysics header but it did not work.

Here is my Entity.h

#ifndef __Game__Entity__
#define __Game__Entity__

#include <iostream>
#include <string>

#include "OGRE/Ogre.h"

#include "OgreInit.h"

class Entity{
public:
    Entity(std::string entityId, std::string mesh, Ogre::Vector3 position = Ogre::Vector3::ZERO, Ogre::Vector3 rotation = Ogre::Vector3::ZERO);
    virtual ~Entity() = 0;

    void setPosition(Ogre::Vector3 position);
    Ogre::Vector3 getPosition();
    void setRotation(Ogre::Vector3 rotationIncrease);
    Ogre::Vector3 getRotation();
    void setMesh(std::string meshName);
    std::string getMesh();
    virtual void tick() = 0;
    void removeEntity();

    Ogre::Entity getEntity();
    Ogre::SceneNode getSceneNode();

    std::string entityId;
protected:
    Ogre::Entity *ent;
    Ogre::SceneNode *nod;
};

#endif /* defined(__Game__Entity__) */

And my EntityPhysics.h

#ifndef __Game__EntityPhysics__
#define __Game__EntityPhysics__

#include <iostream>
#include <string>
#include "OGRE/Ogre.h"
#include "OgreBulletCollisionsBoxShape.h"
#include "OgreBulletDynamicsRigidBody.h"

#include "Entity.h"
#include "OgreInit.h"

class EntityPhysics: public Entity //error occurs here: "Base class has incomplete type"
{
public:
    EntityPhysics(std::string pentityId, std::string mesh, Ogre::Vector3 position, Ogre::Vector3 rotation, /*Physics Specific "stuff"*/std::string shapeForm = "BoxShape", float friction = 1.0, float restitution = 0.0, float mass = 1.0);
    virtual ~EntityPhysics() = 0;
    virtual void tick() = 0;
private:
    float friction, restitution, mass;

    OgreBulletCollisions::CollisionShape *collisionShape;
    OgreBulletDynamics::RigidBody *rigidBody;
};

#endif /* defined(__Game__EntityPhysics__) */

I think it may have to do with me including Entity.h in the child class, but if I do that I get the same error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:09:13+00:00Added an answer on June 12, 2026 at 7:09 am

    This is most likely due to a circular include, and the way to fix this is to remove includes where you don’t need them.

    In Entity.h you don’t need:

    #include "OGRE/Ogre.h"
    #include "OgreInit.h"
    

    You can, and should, instead forward-declare the types. Same for EntityPhysics.h and:

    #include "OGRE/Ogre.h"
    #include "OgreBulletCollisionsBoxShape.h"
    #include "OgreBulletDynamicsRigidBody.h"
    
    #include "OgreInit.h"
    

    the only one you actually need is Entity.h.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a base class called Base . This base class has a method
I have a base class, B, which has two constructors, one with no paremeters
I have an entity model where the base class in an inheritance structure has
I have a base class with a property called Name, which has an XmlText
Suppose I have a base class named Visitor, and it has 2 subclass Subscriber
Class DVD inherits class Media, has one more variable than the base class does.
I have a class that inherits a base class to which another class has
I have usercontrols which inherit a base class which looks like this: BasePage.cs: using
We have the following shared component: public class OurServiceBase : System.ServiceProcess.ServiceBase This class has
My base class has this function LRESULT CBaseClass::OnTestFunction(WPARAM id, LPARAM=0) { ... } When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.