'make: g++ command not found error with makefile

I'm writing a makefile like so:

LIB_DIR = $(shell pwd)/.linuxbrew/Cellar/boost/1.62.0/

FLAGS = -std=c++14

INC= -I$(LIB_DIR)include
LIB_PATH = -L$(LIB_DIR)lib
LIB = $(LIB_DIR)lib

LIBNAMES := filesystem-mt filesystem system-mt system

LIBS := $(foreach N,$(LIBNAMES),$(LIB)libboost_$N.a $(LIB)libboost_$N.dylib)

PATH = /Some/Path/

default:
        g++ main.cpp $(FLAGS) $(INC) $(LIB_PATH) $(LIBS) -o assemble
        ./assemble $(PATH)

clean:
        rm assemble

The problem is, once I include the variable 'LIB_DIR', it complains that g++ can't be found. I could use some help.



Solution 1:[1]

It's not LIB_DIR, but rather PATH that's killing you. Try commenting out that line. (I'm assuming g++ is not in /Some/Path/)

Solution 2:[2]

Try the below command:

yum groupinstall 'Development Tools'

The command install all development tools like make, gcc, etc.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John
Solution 2 Jai