Jump to content
  • Advertisement
Sign in to follow this  
ratha

LNK2005

This topic is 2805 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

Hi!
I got the following linker error:

Error 196 error LNK1169: one or more multiply defined symbols found D:\Goldminer\Debug\GoldMiner.exe
Error 170 error LNK2005: "int fieldradius" (?fieldradius@@3HA) already defined in Fighter.obj D:\Goldminer\Game.obj
Error 171 error LNK2005: "int fieldradius" (?fieldradius@@3HA) already defined in Fighter.obj D:\Goldminer\GameCreditsState.obj
Error 172 error LNK2005: "int fieldradius" (?fieldradius@@3HA) already defined in Fighter.obj D:\Goldminer\GameHOFMenuState.obj
Error 173 error LNK2005: "int fieldradius" (?fieldradius@@3HA) already defined in Fighter.obj D:\Goldminer\GameIntroState.obj

I've not define fieldradius in Fighter.h. I've defined it globaly in a file called GameManager.h only. Then why do linker report it multiply defined? How to resolve this error?

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!