...

View Full Version : C Project Layout



frazras
06-21-2007, 02:14 AM
I am a Java programmer, I am used to packages and so on for a Java project layout.
eg. This is how I usually lay out my Java project

ProjectJava
|-dist
--projectJava.jar
|-src
=|-package.one
-packageOneFile0.java
:
-packageOneFile10.java
=|-package.two
-packageTwoFile0.java
:
-packageTwoFile8.java
=|-resources
-resource.png
-resource.mp3
|-build
=|-package.one
-packageOneFile0.class :
:
-packageOneFile10.class
=|-package.two
-packageTwoFile0.class
: :
-packageTwoFile8.class

Recently I had to lean C but I don't know how to layout multiple files. Right now every thing is in one directory. What would be a good example layout for a c project with things like "dot h" files, a Makefile, "dot c" files and any other c related files that may be necessary

Spookster
06-21-2007, 02:31 AM
Well generally you would put all .c and .h files that are related into the same directory. If you have more than one category of files then you could have multiple directories. You would then want a main directory containing your main file along with your makefile and such.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum