Skip to main content
gamedev.net
🔒 Locked

Linking Problems

Started by Nullio Dec 7, 2001 at 6:20 PM 0 replies 250+ views
Original Post
Nullio
Nullio
I''m having problems knowing how do set up my include statements, here''s the problem: I have one source file called TileEngine.cpp it contains global variables and functions that are needed in the Tile Based game I am creating, I also have a Class called CSprite stored in CSprite.h and CSprite.cpp. I want this class to be used in TileEngine.cpp but there are globals in the TileEngine.cpp that I need to use in CSprite.h. So how do I set up my #include''s so I would get errors and it will all work out P.S. Is there are any good tutorials or articles on good ways of doing this kind of stuff???
Kwizatz
Kwizatz
  
in CTileEngine.h:

int someglobalvariable;

in CSprite.h:

extern int someglobalvariable;

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.