I am trying to make a project I downloaded from github.
After setting up all the dependencies, it asks me to run 'make'. However, 'make' fails and complains about chrono
file not being found.
I understand that it is a compiler related issue and I have to enable c++11 support. More specifically, pass the compiler flag -stdlib=libc++
.
However, adding this flag to my Makefile still produces the same error. Can anyone explain where/how this flag needs to be set?
this is the content of the Makefile:
TARGETS = \
ptools \
feature \
libsvm \
wrapper
all:
-for dir in $(TARGETS); do \
cd $${dir}; $(MAKE); cd ..; \
done cd libsvm; $(MAKE) lib; cd ..;
clean:
-for dir in $(TARGETS); do \
cd $${dir}; $(MAKE) clean; cd ..; \
done
test:
@echo hello;
.PHONY: clean $(TARGETS)
Update1: After running brew install gcc
, it starts downloading the dependencies. However, it always breaks when it's downloading one of the dependencies, mpfr, with this error: Error: mpfr cannot be built with any available compilers. Install GNU's GCC.
Update2: I managed to update gcc and the version it returns is 6.2.0. However, I am still seeing the same error.
I added CXXFLAGS += -stdlib=libc++ -std=gnu++11
to my Makefile, bust still see the same result.