Author Topic: Directory structure.  (Read 4563 times)

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Directory structure.
« on: November 15, 2005, 03:58:23 am »
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
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Directory structure.
« Reply #1 on: November 15, 2005, 04:13:06 am »
Everybody uses different structures, and it also depends on the size and scope of the project.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Directory structure.
« Reply #2 on: November 15, 2005, 08:45:16 am »
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).

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Directory structure.
« Reply #3 on: November 19, 2005, 02:01:37 am »
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
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Directory structure.
« Reply #4 on: November 19, 2005, 03:57:58 pm »
It could look like this, for example:
Code: [Select]
|
+--- 3rdParty
|       |
| +--- wxWindows-2.4.2
|       |      |
|       |      +--- lib
|       |      +--- ...
|       |
| +--- wxWidgets-2.6.1
| +--- wxWidgets-2.6.1
|
+--- MinGW
| |
| +--- bin
| +--- include
| +--- lib
| |
| ...
|
+--- CodeBlocks
| |
| +--- lib
| +--- include
| +--- codeblocks.exe
| |
| ...
|
...
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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Directory structure.
« Reply #5 on: November 23, 2005, 03:11:22 am »
Path Variables as in?  Sorry, for these simple qustions.  While I know C/C++ (and other languages) and have plenty of experience structure like this I didn't learn.  VC++, or the companies I worked for, hid that stuff pretty well.

jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Directory structure.
« Reply #6 on: November 23, 2005, 02:28:27 pm »
Put the directories where your stuff is located in there:



If you use HEAD, you can use global user variables for those locations too, this is a lot more comfortable.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Directory structure.
« Reply #7 on: November 25, 2005, 10:27:04 pm »
HEAD, I am assuming you are refering to the unix command, prints the first amount of lines specified at the command line.  I know I can put the directories in there, but I must admit, I am missing the connection with the unix head command.  I was thinking about it, and can you put a custom variable under the custom variables tab and reference it in the directories list?  Like:

LIB_DIR=c:\libraries

and then in the directories tab:

$LIB_DIR$\wxWidgets_2.6.2

Can this be done?  Where does HEAD fit in?  Unless you're talking about a cvs command.  I don't know a lot about cvs.

  As for global user variables, are you talking about OS variables?  I guess I don't understand the use of HEAD you are refering too.
jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Directory structure.
« Reply #8 on: November 25, 2005, 10:35:50 pm »
HEAD is the most recent CVS version :)

Quote
I was thinking about it, and can you put a custom variable under the custom variables tab and reference it in the directories list?  Like:

LIB_DIR=c:\libraries

and then in the directories tab:

$LIB_DIR$\wxWidgets_2.6.2

Can this be done?

Yes, this is exactly the purpose of those variables :)

Quote
As for global user variables, are you talking about OS variables?

No, he was talking about the new feature called "global compiler variables" which can be found in HEAD (cvs!). It's *like* custom variables but they differ in two important ways:

1) they 're global (i.e. *not* project-specific)
2) if the project you 're opening contains unknown global variables, the user is prompted to define them.

For more info look into the wiki entry about global user variables.
Be patient!
This bug will be fixed soon...

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Directory structure.
« Reply #9 on: November 28, 2005, 02:39:13 am »
Cool.  I'll have to check it out.  Time to take a look at that build I downloaded with last major chance.
jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.