Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question C Project Layout

    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

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •