Archived

This topic is now archived and is closed to further replies.

Code Organisation - compiler Q,

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

I have a bunch of common cpp and h files that I presently keep in just 1 folder. I''d now like to organize them so that files with similar functionality are kept in seperate subfolders of the root folder. Unfortuantely with MSVC6 I have had to add each subfolder to the compilers directory settings - I was hoping that the compiler would search all subfolders of a given folder too so that I wouldn''t have to do this. How do you arrange your common files so that your projects are kept well oraganized and so that it is quick & easy to set up the same project in different compilers?

Share this post


Link to post
Share on other sites
I assume you are talking about header files, since you have to explicitly add source files no matter how they are organized...

My view is that adding include directories to the compiler settings is a bad idea. The right thing to do is add the folder name to the #include directive (#include "bar.h" ==> #include "foo/bar.h").

Share this post


Link to post
Share on other sites