Skip to main content
GameDev.net gamedev.net
🔒 Locked

Code organization and libraries

Started by MajinMusashi Aug 27, 2005 at 1:25 AM 2 replies 500+ views
Original Post
MajinMusashi
MajinMusashi
Hi! As my projects begun to grow more than what I've expected, separating them into static libraries (text rendering, image loading, sound mixing etc.) was such an obvious thing to do, and I think I've done well, since I got smaller compile times, better code legibility and so on.

// game.cpp
#pragma comment( lib, "OpenGL32.lib" )	 // Link against OpenGL library
#pragma comment( lib, "SDL.lib" )	 // Link against SDL library
#pragma comment( lib, "SDLmain.lib" )	 // Link against SDLmain library
#pragma comment( lib, "SDL_mixer.lib" )	 // Link against SDL Mixer library
#pragma comment( lib, "libfreetype.lib" )// Link against FreeType2 library
#pragma comment( lib, "TEXT.lib" )	 // Link against my Text library
#pragma comment( lib, "IMAGE.lib" )	 // Link against my Image library
#pragma comment( lib, "GUI.lib" )	 // Link against my GUI library
#pragma comment( lib, "LOGGER.lib" )	 // Link against my Logger library
#pragma comment( lib, "RESOURCES.lib" )	 // Link against my Resources library
#pragma comment( lib, "SOUND.lib" )	 // Link against my Sound library
But now I think that was not so obvious, as I'm in doubt of what is the optimal way to maintain huge game projects and their modules / libraries organized. Question: How do you organize your code? How most softhouses organize their code? Thanks very much!! [Edited by - MajinMusashi on August 27, 2005 7:24:53 PM]
Daniel Miller
Daniel Miller
You've got the wrong forum, that's why no one is answering.

Try Game Programming. :)
Sneftel
Sneftel
Moved to Game Programming.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.