Jump to content
  • Advertisement
Sign in to follow this  
sipickles

Multiply defined symbols

This topic is 4842 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, Any ideas why I get this linker errors? Cstring.obj : error LNK2005: "public: __thiscall Cstring::Cstring(class Cstring &)" (??0Cstring@@QAE@AAV0@@Z) already defined in Cgame.obj Ctext.obj : error LNK2005: "public: __thiscall Cstring::Cstring(class Cstring &)" (??0Cstring@@QAE@AAV0@@Z) already defined in Cgame.obj CtextBox.obj : error LNK2005: "public: __thiscall Cstring::Cstring(class Cstring &)" (??0Cstring@@QAE@AAV0@@Z) already defined in Cgame.obj 20jun05.exe : fatal error LNK1169: one or more multiply defined symbols found I have used #ifndef etc to avoid multiple inclusions? or am i missing the point? Thanks Simon

Share this post


Link to post
Share on other sites
Advertisement
It sounds like you defined functions in your header but outside the class without declaring them inline. That will generate multiple symbol linker errors if you include the header in multiple source files. Either make them inline, by declaring them inside the class definition or by using the inline keyword, or put the function definitions in a separate source file.

For more information see this article.

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!