SDL project linking error, help please!

Started by
1 comment, last by Synt4x 18 years ago
ok, I realized i might have had this in the wrong forum part, so here it goes: Hey guys, I am having trouble with this linking error. I fixed all my compiling errors. It's using SDL + Visual Studio 6.0 (C++) Build Log --------------------Configuration: SDL Introduction - Win32 Debug-------------------- Command Lines Creating temporary file "D:\DOCUME~1\Bryan\LOCALS~1\Temp\RSP1D7.tmp" with contents [ /nologo /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/SDL Introduction.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "D:\Programming\Projects\Game Programming\SDL\SDL Introduction\Main.cpp" ] Creating command line "cl.exe @D:\DOCUME~1\Bryan\LOCALS~1\Temp\RSP1D7.tmp" Creating temporary file "D:\DOCUME~1\Bryan\LOCALS~1\Temp\RSP1D8.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/SDL Introduction.pdb" /debug /machine:I386 /out:"Debug/SDL Introduction.exe" /pdbtype:sept ".\Debug\Main.obj" ] Creating command line "link.exe @D:\DOCUME~1\Bryan\LOCALS~1\Temp\RSP1D8.tmp" Output Window Compiling... Main.cpp Linking... Main.obj : error LNK2001: unresolved external symbol "void __cdecl Shutdown(void)" (?Shutdown@@YAXXZ) Debug/SDL Introduction.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Results SDL Introduction.exe - 2 error(s), 0 warning(s) let me know if anyone can help me... Thank you very much, -Karakadin THEN someone asked where shutdown was used, so here it is: void shutdown is in two places: here: int main(int argc, char **argv) { Init(); // Game Loop while(!g_StateStack.empty()) { g_StateStack.top().StatePointer(); } Shutdown(); return 0; } and here: // Shutdown void ShutDown() { // Shuts down TTF lib. TTF_Quit(); // Frees surfaces SDL_FreeSurface(g_Bitmap); SDL_FreeSurface(g_Window); // Shuts down SDL and frees the resouces it was using. SDL_Quit(); } thanks, -Karakadin
Advertisement
The implementation of Shutdown is actually called ShutDown (capital D). Renaming it to Shutdown should fix your problem.

Hope this helps.
thank you very much, I will give this a try as soon as I get back from work

-Karakadin

This topic is closed to new replies.

Advertisement