I have the desired header files in the folder '/mnt/droplet/include'. I use the -I option (-I/mnt/droplet/include) while creating the desired object file. The aforementioned folder contains the header file "stdlib.h", however the compiler tries to include the header file located at '/usr/include/stdlib.h' instead.
How do I ensure that the header file in directory '/mnt/droplet/include/' is included instead.
Note that there are several more such header files I wish to include in the same way, and replacing them directly in usr/include is not an option.
The make file for the same is as follows
LIBS := -L/mnt/droplet/gcc-7.1/lib64/ -L/mnt/droplet/local/lib/v1.2/
CXX := /mnt/droplet/gcc-7.1/bin/g++ -std=c++1z
INCS := -I/mnt/droplet/include -I/mnt/droplet/local/include/v1.2/
SRCS := main.cpp
CXXFLAGS := -Og -g -ggdb3
OUT_EXE := binary
SRCS_EXE := ${SRCS}
OBJS := $(addsuffix .o,$(basename ${SRCS}))
OBJS_EXE := $(addsuffix .o,$(basename ${SRCS_EXE}))
${OUT_EXE}: ${OBJS_EXE}
g++ -g -o $@ ${OBJS_EXE} ${LIBS}
%.o : %.cpp
${CXX} -v -c ${CXXFLAGS} ${MAIN_DEF} ${INCS} $< -o $@
clean:
rm -f core ${OBJS_EXE} ${OUT_EXE}