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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:45:09+00:00 2026-06-08T10:45:09+00:00

First of all, i have two codes: ManagedGlobalsDeclaration.h #ifndef MGD_H #define MGD_H #include Editor.h

  • 0

First of all, i have two codes:

ManagedGlobalsDeclaration.h

#ifndef MGD_H
#define MGD_H

#include "Editor.h"
#include <vcclr.h>

using namespace System;
using namespace Cube3D;

namespace Cube3D {
    class ManagedGlobals
    {
        public: 
            gcroot<Editor ^> MainEditor;
    };
}

#endif

Editor.h

#ifndef EDITOR_H
#define EDITOR_H

#include "System.h"                     
#include "AddRenderingPipelineCommand.h"
#include "AddMaterial.h"                
#include "P_Material.h"             
#include "P_UMesh.h"                    
#include "Log.h"
#include "ManagedGlobals.h"             //     <------ Error!

#include <vcclr.h>

namespace Cube3D {

    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;

    void LoopRender(void);
    void GetRenderingOrder(void);
    String^ GetListbox2Item();

    TextureObject InstancedTexturing[10];
    UMesh InstancedMesh[10];

    /// <summary>
    /// Summary for Editor
    /// </summary>
    ref class Editor : public System::Windows::Forms::Form
    {
        // Bla bla bla....

ManagedGlobals.h

#ifndef MG_H
#define MG_H

#include "ManagedGlobals_Declaration.h"

extern ManagedGlobals MG;

#endif

But my compiler tells me that it doesn’t know Editor, in ManagedGlobalsDeclaration. The class ManagedGlobals is declared in ManagedGLobalsDeclaration.h, and is then(somewhere else) actually defined, so thats why i make a header just to use the extern. But why doesn’t it recognize Editor?

Error 29 error C2065: 'Editor' : undeclared identifier
  • 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-08T10:45:11+00:00Added an answer on June 8, 2026 at 10:45 am

    You have a circular include. Try using a forward declaration instead:

    #ifndef MGD_H
    #define MGD_H
    
    #include <vcclr.h>
    
    using namespace System;
    using namespace Cube3D;
    
    namespace Cube3D {
        ref class Editor;
    
        class ManagedGlobals
        {
            public: 
                gcroot<Editor ^> MainEditor;
        };
    }
    
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I am new to R (I started yesterday). I have two
Hey all, Here's a funny one. I have two ViewControllers: first one (fires on
I have two Lists, the firs (right) represents a list of all cars and
First of all I have many Django instances setup and running like this. In
First of all I have searched many times in this forum but none is
First of all I have to say I am new to iOS development. My
First of all i have frames on my SD Card and frames are there
First of all i have to clear few things 1.This is not spam group
So first of all I have such image (and ofcourse I have all points
Hi guys first of all I have no expirience with DB programing only basic

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.