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 7503147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:07:16+00:00 2026-05-29T21:07:16+00:00

…which I cannot seem to figure out, for whatever reason. I’ve tried cleaning my

  • 0

…which I cannot seem to figure out, for whatever reason. I’ve tried cleaning my build files in Qt as well, and that hasn’t seemed to work either.

First off, let me state that I’m well aware that this error typically crops up when a C++ class inherits an abstract class with pure virtual functions, and the inheriting class (for whatever reason) hasn’t defined them yet.

The issue is that there are NO pure virtual functions which exist in relation to the error specified.

I have a base class known as CoordinateObject, with an abstract class, Shape, which inherits from that base class, along with a FirstPersonCamera class which also inherits from CoordinateObject. Now, my Cubef class inherits from Shape, and when I try to compile the code, I get the following errors:

./debug\Camera.o:Camera.cpp:(.rdata$_ZTVN6Engine17FirstPersonCameraE[vtable for Engine::FirstPersonCamera]+0x10): undefined reference to `Engine::FirstPersonCamera::InitCoordinates()'
./debug\Cubef.o:Cubef.cpp:(.rdata$_ZTVN6Engine5CubefE[vtable for Engine::Cubef]+0x1c): undefined reference to `Engine::Cubef::InitCoordinates()'

Originally this cropped up when CoordinateObject did have a pure virtual function InitCoordinates, however, after trying to implement that properly within every class which chose to inherit from it, it still didn’t work. Thus, I removed it (along with every class implementation and declaration except for the base class itself).

So, I need to know exactly what I’m doing wrong here. I’ll post code as follows:

Code

CoordinateObject.h

class CoordinateObject
    {
    public:

        CoordinateObject( void );

        virtual ~CoordinateObject( void )
        {
            delete mWorld;
            delete mObject;
            delete mInertial;
        }

        Matrix3fv GetInertialSpace( void );

        Matrix3fv GetObjectSpace( void );

        Matrix3fv GetWorldSpace( void );

        void SetInertialSpace( Matrix3fv* space );

        void SetInertialSpace( Matrix3fv& space );

        void SetObjectSpace( Matrix3fv* space );

        void SetObjectSpace( Matrix3fv& space );

        void SetWorldSpace( Matrix3fv* space );

        void SetWorldSpace( Matrix3fv& space );

    protected:

        Matrix3fv* mWorld;
        Matrix3fv* mObject;
        Matrix3fv* mInertial;

    private:

        void InitCoordinates( void );
    };

Shape.h

#pragma once

#include "stdafx.h"

namespace Engine
{
    class Circlef;

    class Shape
            : public CoordinateObject
    {

    public:

        Shape( Vector3f& center, float radius );

        virtual ~Shape( void )
        {
            delete mCenter;
        }

        virtual void Collide( Shape& s ) = 0;

        virtual void Collide( const Circlef& s ) = 0;

        Vector3f* Center( void );

        virtual void Draw( void ) = 0;

        void SetCenter( Vector3f newCenter );

        void SetCenter( Vector3f* newCenter );

        float mRadius;

    protected:

        Vector3f* mCenter;

    private:

        void InitShape( Vector3f& center );
    };
}

Cubef.h

#pragma once

#include "stdafx.h"

namespace Engine
{
    class Cubef
            : public Shape
    {
    public:
        Cubef( Vector3f center, float radius );

        virtual ~Cubef( void )
        {
            delete mCenter;
        }

        virtual void Collide( Shape& s );

        virtual void Collide( const Circlef& s );

        virtual void Draw( void );

        void Draw( const Vector3f& camPosition );

        void Draw( const Vector3f& newCenter, float radius, const Vector3f& camPosition );

        void DrawFront( void );

        void DrawBack( void );

        void DrawLeft( void );

        void DrawRight( void );

        void DrawTop( void );

        void DrawBottom( void );

        inline double GetEdgeLength( void ) const
        {
            return mEdgeLength;
        }

        inline int GetCubeId( void ) const
        {
            return mCubeId;
        }

        inline double GetSurfaceArea( void ) const
        {
            return mSurfaceArea;
        }

        void Rotatef( float angle, AngleOfRotation aor );

        void Rotatef( float angle, Vector3f* toRotate, AngleOfRotation aor );

    protected:

        static int CubeCount;

        const int mCubeId;

        float mSurfaceArea;

        float mEdgeLength;

    private:

    };

}

And finally, Camera.h

namespace Engine
{
    extern const float PI;

    extern const double MOUSE_Y_SENSITIVITY;

    extern const double MOUSE_X_SENSITIVITY;

    extern const int FP_CAM_QUAT_ARR_LEN;

    class FirstPersonCamera
            : public CoordinateObject
    {
    public:
        FirstPersonCamera( void );

        ~FirstPersonCamera( void );

        void Rotate( SDL_Event*& event );

        inline Vector3f GetPosition( void ) const
        {
            return *mPosition;
        }

        inline Matrix3fv GetRotation( void ) const
        {
            return *mRotation;
        }

        void MoveCamera( const SDL_KeyboardEvent& event );

        void UpdateCamera( void );

        void UpdateCamera( const Vector3f& coords );

    private:

        void InitCamera( void );

        Matrix3fv* mRotation;

        Vector3f* mPosition;

        float mAngle;
    };

}

I’ve even tried initializing the default constructor of CoordinateObject‘s ctor in any deriving class’ initialization list, but honestly I doubt that makes a difference.

Example

(from Shape.h)

Shape::Shape( Vector3f& center, float radius )
    : CoordinateObject(),
      mRadius( radius )
{
    InitShape( center );
}

As you can see, CoordinateObject‘s constructor is called here, in the initialization list, even though it is default.

I’m at a loss as to what to do.

Halp?

  • 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-05-29T21:07:18+00:00Added an answer on May 29, 2026 at 9:07 pm

    Update

    I had it compiling under Debug in MinGW, but now that I switched to Release (for whatever reason), it worked!

    Why it worked this way, I’m not quite sure. Maybe a glitch somehow with Qt (or MinGW, even)?

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

Sidebar

Related Questions

so I did $subject = 'sakdlfjsalfdjslfad <a href=something/8230>lol is that true?</a> lalalala'; $subject =
CGI.escapeHTML is pretty bad, but CGI.unescapeHTML is completely borked. For example: require 'cgi' CGI.unescapeHTML('&#8230;')
I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
(tl;dr: see summary at the bottom.) I am implementing an application that pulls content
I have this xml <entry id=1008 section=articles> <excerpt><p>&#8230; in Richtung „Aus für Tierversuche. Kosmetik-Fertigprodukte
I would like to run a str_replace or preg_replace which looks for certain words
I see that some rss on xml have strange strings. For example, ... is
I'm trying to work out why it won't let me attach a file from
what about this one: I want to format the currentTime displayed by a videoPlayer
I have been making a wordpress template. i got stuck at some place... the

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.