CodeBlocks is a cross-platform (Linux, Mac, Windows (uses wxWidgets)), open-source, free IDE that supports GCC, Visual C++, and Clang compilers.
CodeBlocks is a powerful IDE for creating, compiling, executing and debugging C/C++ programs.
Please read previous post : How To Install CodeBlocks IDE on Windows
Create C Project In CodeBlocks
- Open CodeBlocks, go to Start Menu > All Apps > CodeBlocks > CodeBlocks.
- Click on the File menu, select New > Project….
- From the New form template window select “Console application” and click the “Go” button.
- If you see a welcome message, click the “Next >” button to skip the welcome message.
- On the next window, select your language from Console application window and click the “Next >” button.
- On the next window,
- Type “Project_1” in the Project title Text Field to change Project Name.
- Click the “ellipsis” button present under Folder to create project in. Browse your C workspace, mention the file name click Finish. Navigate to save project directory (ex: D:\Program\Algortihm).
- Click the “Next >” button.
- On the next window, click the “Finish” button.
- Now in the left side of the screen go to Projects in the “Management” sub-window. Expand your new project and its folder “Sources“. You will see that CodeBlocks.
Compile and run C program in CodeBlocks
Once you created your first C Project, You see? The “hello-world” code is already there. It is time to compile and run your first C program.
- Go to menu Build > “Build and Run” or just press F9 and then OK, when you are asked if you want to build the project.
- A console will open and you will see the greeting on the screen.
Thanks for reading!