Jump to content
  • Advertisement
Sign in to follow this  
KKTHXBYE

X does not name a type/ circular reference

This topic is 393 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I bet its circular reference but please when i include a definition of X then it should compile and run anyway.

#ifndef game_initH
#define game_initH
#include "logme.h"
#include "globalvars.h"

#include "stdlib.h"
#include "sim/ocean.h"
#include "string.h"
#include "Textures.h"


#include "sim/ships/battle_mp.h"

//#include "sim/ships/ship.h"
#include "Timer.h"

#include "shaderclass.h"

#include "HUD/HUD.h"
#include "HUD/menu/menulist.h"
#include "sim/Entity.h"
const int viewport_size = 128;

extern TBattleMP_Frame * GAME_PLAY; < -- TBattleMP_Frame does not name a type

 

and in battle_mp.h 


struct TBattleMP_Frame
{
};

 

 

 

why it is even throwing me errors. That shouldnt occur :)

Share this post


Link to post
Share on other sites
Advertisement

The "struct TBattleMP_Frame { ..}" definition should become for the "extern" line that uses it, in that case.

 

As an alternative, you can also declare the struct

struct TBattleMP_Frame;

extern TBattleMP_Frame * GAME_PLAY;

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!