apt install build-essential.
Most compilation instructions will say to run the command
sudo make installto install the software after compiling. You should instead use the command
sudo checkinstall. That does the same thing but will make the software and its files known to your package managers (e.g. Software Manager and
apt) so that you can easily remove the software or replace it with a newer version. For this you will first have to install checkinstall. Install it from Software Manager or with the command:
apt install checkinstall.
(Edit: if you want to recompile a package installed from the Linux Mint repositories—for example to apply a patch you need—see the How to recompile a package from source topic instead.)