Jump to content
  • Advertisement
Sign in to follow this  
Synt4x

SDL project linking error, help please!

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

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
The implementation of Shutdown is actually called ShutDown (capital D). Renaming it to Shutdown should fix your problem.

Hope this helps.

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!