How to Create Projects Using C Programming
The C programming language can create complex pieces of software with many interrelated components. Setting up the C project is important to keeping things organized. There are a few minimum requirements any C project needs. Once these initial requirements are met, you can organize your source code file structure to suit your tastes. If you wish to learn how to program in C, you would do well to start by learning how to create C projects.
Instructions
-
-
1
Create a folder on your hard drive, and name it whatever you want your project to be called.
-
2
Open the folder and create a text file named "makefile." Create a text file by opening the default text editor for your system (e.g. Wordpad.exe) and clicking on "File" and then selecting "Save." Browse to the directory your created in Step 1 and save the file with the name "makefile."
-
-
3
Create another text file and name it after the project. Make sure this file has the extension ".c," which designates it as a C source code file.
-
4
Open up the "make" file using a text editor. The make file will automate building your program and store compilation-related statements. Write the following statement in the make file, substituting "projectName" for whatever name you have chosen for your project.
gcc -o projectName projectName.c
-
5
Save the make file. Whenever you want to build your C project, run the make file. Do this by opening a command prompt window and typing the following:
make makefile
-
1