Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Spudder

Unresolved Externals - not missing .lib files tho

This topic is 5735 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 have a structure which stores all the game states like high score, level etc. This is in it's own header file called GameStates.h. I've got a global object of this throughout the entire project - GStatesMain - to make accessing the structure members easier without the need to constantly declare local objects. I've got a function that will read the contents of a file into an array for the high-scores which is accesed through this variable - it's this which is causing the error: fin >> GStatesMain.HighScores[h]; where h is an loop variable to loop through the file If i comment out this line it compiles wihtout any errors or warnings but if i leave it in it gives an unresolved external which has really left me stumped. Hope someone can help. EDIT: fixed it, i had mispelt the variable name in main.cpp - works fine now [edited by - Spudder on February 2, 2003 3:09:09 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Are you including the code to go with the header in your project aswell?

Share this post


Link to post
Share on other sites
All of my header files are included in StdAfx.h like it said to, this is #included in all my .cpp files so that''s where i put my globals with extern and then again without extern in main.cpp which is the main file - this is how an article here on GD.net said to but anytime i try to access the GStates structure through GStatesMain i get an unresolved extrenal.

Share this post


Link to post
Share on other sites

  • 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!