mircea-pavel-anton / pacman

A multiplayer Pacman clone written in C++ using SFML.
GNU General Public License v3.0
15 stars 12 forks source link

How can I compile the code #1

Closed AryanSethi closed 3 years ago

AryanSethi commented 3 years ago

I'm relatively new to C++ dev. How can I compile the code on my own PC ?

mircea-pavel-anton commented 3 years ago

If you're using a Linux based system, then you need to make sure you have the following packages installed:

On a Debian based system, the command would look something like this:

sudo apt install g++ make libsfml-dev -y

Once you have these installed, clone the repo, and in the root of the project (in the same directory where the Makefile is), you have a few options:

  1. run make build-debug which will compile the project with the debug directives These directives enable features such as:
    • a performance monitoring tool that will save the time taken in microseconds that the program spent in each function in a .csv file
    • rendering the target tile of each ghost
  2. run make build-release which will compile the project without the debug directives Without the debug directives, you will be looking at the program stripped down of the previously mentioned features.

If you're using a windows based systems, it'll be a bit more tricky. You have to install MinGW to get the g++ compiler and download and install SFML from the official site. Then, you have to manually extract the contents of the makefile and run them manually.

mircea-pavel-anton commented 3 years ago

I will be adding soon a CONTRIBUTING.md file which will detail the steps mentioned above. Thank you for the heads up!