#1 Members - Reputation: 381
Posted 21 October 2012 - 10:55 PM
1>------ Build started: Project: Space Game, Configuration: Debug Win32 ------
1> Game.cpp
1> Generating Code...
1> Compiling...
1> main.cpp
1> Generating Code...
1>main.obj : error LNK2005: "void __cdecl apply_surface(int,int,struct SDL_Surface *,struct SDL_Surface *)" (?apply_surface@@YAXHHPAUSDL_Surface@@0@Z) already defined in Game.obj
1>main.obj : error LNK2005: "struct SDL_Surface * __cdecl load_image(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?load_image@@YAPAUSDL_Surface@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in Game.obj
1>C:\Users\Mathew\Documents\Visual Studio 2010\Projects\Space Game\Debug\Space Game.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Before i go any further i would like to say sorry for the lack of formatting the code and message, I have tried to o it in recent posts but it never worked. But, if im reading this right, its saying that the apply_surface is already somewhere else. But it isn't. I will link the project so i don't have to write all the code out, but i originally had two separate files for the Load_Image and Apply_Surface functions, but i got this message. so i put them all in the game.cpp file, and still got the message, the into he game.cpp. and that is where i am now. I was thinking i could add this to the class, but this is one of the problems i was having with the debug log, so i don't know how i would go about doing it. Again, if im reading this message right, then that wouldn't fix my problem.
all help is much appreciated.
"C spilled his beer all over C++'s shirt. Outraged, C++ shouted, "Good god, man! Have you no class?"
"Your mother is so fat that the recursive function that was used to calculate her mass created a stack overflow"
#2 Members - Reputation: 381
Posted 21 October 2012 - 11:01 PM
Attached Files
"C spilled his beer all over C++'s shirt. Outraged, C++ shouted, "Good god, man! Have you no class?"
"Your mother is so fat that the recursive function that was used to calculate her mass created a stack overflow"
#3 Members - Reputation: 381
Posted 21 October 2012 - 11:03 PM
"C spilled his beer all over C++'s shirt. Outraged, C++ shouted, "Good god, man! Have you no class?"
"Your mother is so fat that the recursive function that was used to calculate her mass created a stack overflow"
#4 Members - Reputation: 381
Posted 22 October 2012 - 06:21 AM
"C spilled his beer all over C++'s shirt. Outraged, C++ shouted, "Good god, man! Have you no class?"
"Your mother is so fat that the recursive function that was used to calculate her mass created a stack overflow"







