📦Prerequisites
All required softwares to compile and run the project
Our project is coded in C, and uses ncurses C library so prerequisites are:
GCC (GNU Compiler Collection): Prerequisites
nurses (New Curses library): Prerequisites
1. GCC (GNU Compiler Collection):
The GNU Compiler Collection is an optimizing compiler produced by the GNU Project supporting various programming languages, inclduing C language
In order to install GCC on Windows, you need a toolkit such as MinGW (Minimalist GNU for Windows) to install it:
Download and install MinGW:



Install needed packages:
Mark this following packages for installation:
mingw32-basemingw32-gcc-g++

then click on "Installation -> Apply Changes":

Now confirm installation and wait until it finishs and click "Close"



Add GCC to the PATH:
Currently, the command prompt cannot detect the GCC because the environment path variable has not been set. Follow the steps below to set the environment path variable for MinGW on the Windows system.
Navigate to MinGW installation folder "default: C:\\MinGW\" and copy "bin" folder's adress (Default: "C:\\MinGW\bin").
Click on Windows Search bar and type "Environment Variables" or "PATH"

Click on "PATH" then "Edit" button

Now click on "New" and paste the "/bin" folder address then click "OK"


And finally, you've GCC installed Successfully!, now you can compile C programs using gcc command:
gcc <filename>.c -o <filename>.exe //command
/*
Example: Compiling a C program I named myProject
gcc myProject.c -o myProject.exe
*/In order to install GCC on Linux, you just need to run this command:
Debian or Ubuntu
sudo apt install build-essential
Arch Linux
sudo pacman -S base-devel
Fedora or Red Hat
sudo dnf install gcc
CentOS or RHEL
sudo yum groupinstall "Development Tools"
To install GCC (GNU Compiler Collection) on macOS, you can use the package manager Homebrew. Here's how to do it:
Install Homebrew if you haven't already. Open Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Once Homebrew is installed, update it by running:
brew updateInstall GCC by running the following command:
brew install gccAfter the installation completes, you can verify that GCC is installed by checking its version:
gcc --version
That's it! GCC should now be installed on your macOS system using Homebrew.
2. ncurses (New Curses Library):
We suppose MinGW is already installed in the system, if it's not should go back to Prerequisites
Open MinGW Installation Manager.
Look for the following packages and mark the checkbox: a-
mingw32-libncurses (dll)b-mingw32-libncurses (dev)c-mingw32-libpdcurses (dll)d-mingw32-libpdcurses (dev)In the context menu click on Installation → Apply Changes.
In order to install GCC on Linux, you just need to run this command:
Debian or Ubuntu
sudo apt-get install libncurses5-dev libncursesw5-dev
Arch Linux
sudo pacman -S ncurses
Fedora or Red Hat
sudo dnf install ncurses-devel
CentOS or RHEL
sudo yum install ncurses-devel
Please note that the commands assume you have administrative privileges (sudo access) on your system. If you encounter any issues, make sure your package manager is up to date and try again.
To install ncurses (New Curses) library on macOS, you can use the package manager Homebrew. Here's how to do it:
Install Homebrew if you haven't already. Open Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install GCC by running the following command:
brew install ncurses
That's it! ncurses should now be installed on your macOS system using Homebrew.
Last updated
Was this helpful?
