LNK error 2005?
Dont even link my do that MSDN page because i was already there and i still cant figure out the problem.
Im getting these erros:
1 2 3 4 5 6 7
|
1
|
1> IntroAnimation.cpp
1>main.obj : error LNK2005: "public: struct SDL_Surface * __thiscall Graphics::LoadImage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadImage@Graphics@@QAEPAUSDL_Surface@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in IntroAnimation.obj
1>main.obj : error LNK2005: "public: void __thiscall Graphics::ApplySurface(int,int,struct SDL_Surface *,struct SDL_Surface *,struct SDL_Rect *)" (?ApplySurface@Graphics@@QAEXHHPAUSDL_Surface@@0PAUSDL_Rect@@@Z) already defined in IntroAnimation.obj
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:\Users\david\Documents\Visual Studio 2010\Projects\MyGame\Debug\MyGame.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
What MSDN link?
The errors are telling you that Graphics::LoadImage() and Graphics::ApplySurface() are defined in main.cpp as well as IntroAnimation.cpp.
@webJose: Both of those are not defined in main or IntroAnimation.cpp. They're defined in Graphics.h
Is Graphics a templated class? I think not, but I don't excel at reading mangled names.
Topic archived. No new replies allowed.