sfizz
sfizz copied to clipboard
fatal error: ghc/fs_std.hpp: No such file or directory when compiling my c++ program
Hi all,
I'm trying to compile a little c++ program with the sfizz library but I have an error. Firstly, I cloned sfizz in my project and built it:
SFZPlayer/
├── sfizz/ # Cloned sfizz repository
├── Makefile
└── main.cpp
cd sfizz
mkdir build
cd build
cmake ..
make
then I tried to compile my program but I have this error:
sfizz/src/sfizz/Synth.h:13:10: fatal error: ghc/fs_std.hpp: No such file or directory
13 | #include <ghc/fs_std.hpp>
| ^~~~~~~~~~~~~~~~
I create a new directory called ghc and put both the fs_std.hpp
and filesystem.hpp
files in it. But I'm still having the same error.
Here's my Makefile:
# Compiler
CXX = g++
CXXFLAGS = -I sfizz/src -I sfizz/external -I ghc -std=c++14
# Paths
SFIZZ_PATH = sfizz
LIBS = -lsndfile -lpthread -labsl_strings -labsl_base
# Targets
TARGET = SFZPlayer
SOURCES = main.cpp
OBJECTS = $(SOURCES:.cpp=.o)
# Rules
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CXX) -o $@ $^ -L $(SFIZZ_PATH)/build/src -lsfizz $(LIBS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(TARGET) $(OBJECTS)
# Phony targets
.PHONY: all clean
Can someone help me ?