- A C compiler such as
gcc - Git (to clone the repository or use it as a template)
- Create a new repository from this template by clicking Use this template on the GitHub repository page, or clone it directly:
git clone https://github.com/Stephenson-Software/c-project-template.git - Open the project in your editor or IDE.
Compile the project with gcc:
gcc projectTemplate.c -o projectTemplate.exeRun the compiled program:
./projectTemplate.exeYou should see the following output:
Hello World!
A convenience script (cr.sh) is provided that compiles and runs the project in one step:
./cr.shIf you use VS Code, you can develop inside a pre-configured container:
- Install Docker Desktop and VS Code.
- Install the Dev Containers extension.
- Open the repository in VS Code and reopen in the container when prompted.
- Rename
projectTemplate.cto match your project name. - Update the
cr.shscript to reflect the new file name. - Modify the code in the
main()function to begin building your application.