Jump to content

  • Log In with Google      Sign In   
  • Create Account


A quick question about organizing my folders


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Crusable   Members   -  Reputation: 590

Like
0Likes
Like

Posted 25 March 2013 - 01:09 AM

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. 

 


"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"

 

 


Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 7005

Like
1Likes
Like

Posted 25 March 2013 - 01:32 AM

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

 

project
 |- 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, 25 March 2013 - 06:35 AM.

"The best comment is a deleted comment."


#3 wintertime   Members   -  Reputation: 1537

Like
0Likes
Like

Posted 25 March 2013 - 05:51 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS