User forums > General (but related to Code::Blocks)
Directory structure.
jmccay:
I was wondering what directory structures everyone else uses for libraries. Do you seperate libraries & headers? Do you keep the entire development directory structure? Do you maintain a current directory with the library you use for everyday coding & a different directory for cvs updates & compiles.
jmccay
takeshimiya:
Everybody uses different structures, and it also depends on the size and scope of the project.
thomas:
It does not matter an awful lot, you can have a long and happy life either way. Everybody should do what he thinks is best. Personally, I keep headers, libraries, and all that makes up one "unit" together, and separate from the rest. Not only libraries and headers, but also the compiler and the IDE. I believe, this is "best".
This strategy allows me to use a global compiler variable for lib/include configuration and switch between different versions quickly and painlessly when necessary.
It also allows me to replace Code::Blocks with a fresh version without touching anything in MinGW and without worrying about any headers and libraries (and vice versa).
jmccay:
Can you give some hard examples like a tree. I don't like the way I have it set up now, so I am hoping to get ideas on how to do it better. Especially using multiple version of the same library.
Joe
thomas:
It could look like this, for example:
--- Code: ---|
+--- 3rdParty
| |
| +--- wxWindows-2.4.2
| | |
| | +--- lib
| | +--- ...
| |
| +--- wxWidgets-2.6.1
| +--- wxWidgets-2.6.1
|
+--- MinGW
| |
| +--- bin
| +--- include
| +--- lib
| |
| ...
|
+--- CodeBlocks
| |
| +--- lib
| +--- include
| +--- codeblocks.exe
| |
| ...
|
...
--- End code ---
That way, you have to set the respective path variables in your projects (can use global user variables if you use CVS), and everything is very configurable and flexible. If you update Code::Blocks or use a different MinGW version tomorrow, it does not matter. Everything will still work fine.
Navigation
[0] Message Index
[#] Next page
Go to full version