Jump to content
  • Advertisement
Sign in to follow this  
Ksingh30

Error

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

can someone tell me what these mean. extra.obj : error LNK2005: "public: __thiscall extra::BoundingBox::BoundingBox(void)" (??0BoundingBox@extra@@QAE@XZ) already defined in engine.obj extra.obj : error LNK2005: "public: bool __thiscall extra::BoundingBox::isPointInside(struct D3DXVECTOR3 &)" (?isPointInside@BoundingBox@extra@@QAE_NAAUD3DXVECTOR3@@@Z) already defined in engine.obj extra.obj : error LNK2005: "public: __thiscall extra::BoundingSphere::BoundingSphere(void)" (??0BoundingSphere@extra@@QAE@XZ) already defined in engine.obj extra.obj : error LNK2005: "float __cdecl extra::GetRandomFloat(float,float)" (?GetRandomFloat@extra@@YAMMM@Z) already defined in engine.obj extra.obj : error LNK2005: "void __cdecl extra::GetRandomVector(struct D3DXVECTOR3 *,struct D3DXVECTOR3 *,struct D3DXVECTOR3 *)" (?GetRandomVector@extra@@YAXPAUD3DXVECTOR3@@00@Z) already defined in engine.obj extra.obj : error LNK2005: "unsigned long __cdecl extra::FtoDw(float)" (?FtoDw@extra@@YAKM@Z) already defined in engine.obj what does that error mean?

Share this post


Link to post
Share on other sites
Advertisement
Yes. You're defining the functions BoundingBox, isPointInside, BoundingSphere, GetRandomFloat, GetRandomVector and FtoDw in a header file. This header file gets included by extra.cpp and engine.cpp, thus the functions get defined twice, one time in each file. Either make the functions inline, or keep their declarations in the header file and move their implementations into one source file (extra.cpp)

Share this post


Link to post
Share on other sites
doh, I didnt even realize I was doing that. thank you very much. hey is there a tutorial on error, like what kinds of errors mean what. cuz to mea they are all just errors.

Share this post


Link to post
Share on other sites
Look them up in MSDN. If you're using Visual Studio you should just be able to click on the error and hit F1.

If you understand how your tools work (in this case, the linker) then the errors will make a fair amount of sense without any further explanation. So it sounds like you don't need a tutorial on errors, you need an overview of what a linker is and how it works.

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!