I have a Makefile that looks like this:
CFLAGS = `pkg-config opencv --cflags` -Wall -Wextra -Werror -pedantic -std=c++11
LIBS = `pkg-config opencv --libs`
% : src/%.cpp src/%.h
$(CXX) $(CFLAGS) -g -o bin/$@ $< -O3 $(LIBS)
clean:
rm -rf bin/*
When I run `make skin-detect'
I get this error:
make skin-detect
c++ `pkg-config opencv --cflags` -Wall -Wextra -Werror -pedantic -std=c++11 -g -o bin/skin-detect src/skin-detect.cpp -O3 `pkg-config opencv --libs`
ld: can't open output file for writing: bin/skin-detect, errno=2 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [skin-detect] Error 1
I'm on Mac Catalina. This post:
ld: can't open output file for writing: bin/s, errno=2 for architecture x86_64
seems to address the issue, but I don't understand the recommendation. Do I need to instruct bin/skin-detect/
to be made manually? I'm very new to compilers...