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

  • Home
  • SEARCH
  • 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 8222981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:30:28+00:00 2026-06-07T14:30:28+00:00

I am having the usual errors within header files, as listed below. Error 54

  • 0

I am having the usual errors within header files, as listed below.

Error   54  error C3083: 'Resources': the symbol to the left of a '::' must be a type   e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  28  1   DX2DHelper
Error   55  error C2039: 'DX2DImage' : is not a member of 'DX2DHelper'  e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  28  1   DX2DHelper
Error   56  error C2061: syntax error : identifier 'DX2DImage'  e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  28  1   DX2DHelper
Error   57  error C3083: 'Resources': the symbol to the left of a '::' must be a type   e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  32  1   DX2DHelper
Error   58  error C2039: 'DX2DImage' : is not a member of 'DX2DHelper'  e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  32  1   DX2DHelper
Error   59  error C2143: syntax error : missing ';' before '*'  e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  32  1   DX2DHelper
Error   60  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\sprite.h  32  1   DX2DHelper
Error   61  error C2061: syntax error : identifier 'GameBase'   e:\users\nkosi\documents\visual studio 2010\projects\directx games\direct2d\dx2dhelper\dx2dhelper\systemclass.h 30  1   DX2DHelper

However, for the life of me, I can’t figure out what I am doing wrong. I know I’m probably missing a semi-colon or something, but I really can’t figure it out. All the header files are below.

DX2DHelper.h

#include "targetver.h"

#define WIN32_LEAN_AND_MEANheaders
// Windows Header Files:
#include <windows.h>

#include <iostream>

#include <D2D1.h>
#include <D2D1Helper.h>
#include <wincodec.h>
#include <D2DBaseTypes.h>
#include <D2Derr.h>

#define DLEX __declspec(dllexport)

#include "GameBase.h"
#include "SystemClass.h"
#include "DX2DImage.h"
#include "Sprite.h"

SystemClass.h

#ifndef SYSTEMCLASS_H
#define SYSTEMCLASS_H

#include "DX2DHelper.h"

namespace DX2DHelper
{
    namespace Core
    {
        class SystemClass;
        struct WindowOptions;

        struct DLEX WindowOptions {};

        class DLEX SystemClass
        {
        public:
            bool Initialize(WindowOptions options, HINSTANCE hInst);
            void Run(GameBase* game, DX2DInitOptions options);
        private:
            WindowOptions options;    
        };
    }
}
#endif

DX2DImage.h

#ifndef DX2DIMAGE_H
#define DX2DIMAGE_H

#include "DX2DHelper.h"

namespace DX2DHelper
{
    namespace Resources
    {
        class DX2DImage;
        class DX2DImageLoader;

        class DLEX DX2DImageLoader
        {
        public:
            HRESULT LoadFromFile(char* filePath, DX2DImage* image);
        };

        class DLEX DX2DImage
        {
        public:
            friend class DX2DImageLoader;
        };
    }
}

#endif

Sprite.h

#ifndef SPRITE_H
#define SPRITE_H

#include "DX2DHelper.h"

namespace DX2DHelper
{
    namespace GameComponents
    {
        class DLEX Sprite
        {
        public:
            void SetImage(DX2DHelper::Resources::DX2DImage* image);

        private:
            DX2DHelper::Resources::DX2DImage* image;
        };
    }
}
#endif

GameBase.h

#ifndef GAMEBASE_H
#define GAMEBASE_H

#include "DX2DHelper.h"

namespace DX2DHelper
{
    namespace Core
    {
        class DLEX GameBase
        {
        public:
            friend class SystemClass;

            HRESULT Initialize(HINSTANCE hInst, HWND winHandle, struct DX2DInitOptions options);
        };

        struct DLEX DX2DInitOptions {};
    }
}
#endif

If anyone could figure out the mistakes, I would be very grateful. I’ve been looking at the same files for probably close to an hour, hour and a half now, and I just can’t fix it.

  • 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-07T14:30:29+00:00Added an answer on June 7, 2026 at 2:30 pm

    Your headers have (many) include cycle(s). For example, DX2DHelper.h includes Sprite.h includes DX2DHelper.h. This is probably what’s causing your errors. This code isn’t Java, and those aren’t import statements: #include cycles totally kill compiles, even if you don’t get a compile error specifically stating so. Pick an acyclic order for your header files.

    I’d suggest that DX2DHelper.h not have any of the includes at the bottom. Sprite.h could include DX2DImage.h.

    Where your objects have cyclic dependencies (as is the case with SystemClass and GameBase, for example), you’ll need another solution. Forward declare the dependent class without giving its full declaration, e.g. in SystemClass.h you might add somewhere early:

    namespace DX2DHelper { namespace Core { class DLEX GameBase; } }
    

    and similarly in in GameBase.h:

    namespace DX2DHelper { namespace Core { class DLEX SystemClass;} }
    

    This can even be a good idea when there aren’t cyclic object dependencies involved — its usually an easy way around the type of header hell you’ve run into here. Of course, to get everything to compile, you’ll probably need to #include the appropriate headers in the corresponding implementation files. But, assuming you don’t #include any of your .cpp/.cc files, this should allow everything to compile without the #include hell you’ve gotten yourself into.

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

Sidebar

Related Questions

I'm having the following error in my application (quite usual as far as I've
Having just added a new button in my web application, I get an error
As usual, I'm having strange issues with deploying a Rails app to our different
I'm having some trouble, as usual, with making my html and jquery work on
As usual, I'm trying to use a new technology and having problems right off
I'm having trouble with the Dojo documentation (as usual). On their TabContainer API ,
Having a table with class .data, I want to apply setMask, usual way is:
I'm having a weird error that happens under weird circumstances. The list of skill
As usual in PK and Fk relationship. I am having two tables one is
I have a large number of resources in my drawable folder.All are having big

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.