Jump to content
  • Advertisement
Sign in to follow this  

A quick question about organizing my folders

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

Hello, I am wondering if/how I can separate my .dlls into another folder. Currently I only have one folder with all my "crap"(code, images, sounds, .dlls, ect) in it, and I am looking into organizing the "crap" into multiple folders. Thanks for any help. 


Share this post

Link to post
Share on other sites

Well it depends on your programming language, what I usually have, for C or C++, is as follows:


 |- bin/           (for binaries and required DLLs.. you can also have a lib folder)
 |   |- debug/
 |   |- release/
 |- data/          (for assets, such as databases, images, sounds, and so on)
 |   |- images/    
 |   |- sounds/
 |- doc/           (for your documentation, either generated or written)
 |   |- html/
 |   |- pdf/
 |- src/           (for the source code files, organize in subfolders)
 |   |- folder1/
 |   |- folder2/
 |- include/       (for the header code files, if applicable)
 |   |- folder1/
 |   |- folder2/
 |- misc/          (anything left that you want to include)



When it comes to DLL's, though, you might not want to drag around a bunch of common DLL's when distributing your program, so you might want to ask the user to install the required frameworks instead of providing the DLL's yourself, this makes it easier on you and ultimately on the user, since there will be no duplication.


As for how to get your program to find those DLL's, well, unless you are loading them dynamically, they need to be in the program's PATH variable for the system to find them, this PATH includes your system PATH (operating system library folder, and other programs tend to write themselves in this variable too) in addition to the directory where the program was launched, which generally means you need your custom DLL's to be right next to your program, at least under Windows.


This also applies to resources to some extent, so for release you probably don't want a bin/ folder.


If you use an installer you can make things more consistent, but this is more advanced.

Edited by Bacterius

Share this post

Link to post
Share on other sites

You can also add:


obj - with debug and realease subdirs, so the compiled object files are not intermingled with the source files

lib - with debug and realease subdirs, so you can neatly organize your project into librarys and have the .lib or .a files there

test - source for test programs/unittests

srcdata - if you have data files that get converted before being used by your program

srcdoc - if you generate those html/pdf/whatever automatically


Actually you can just add as many folders as you need, if they help organizing your files.

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!