Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: ghc/fs_std.hpp: No such file or directory when compiling my c++ program #1276

Open
Duddy67 opened this issue May 31, 2024 · 0 comments

Comments

@Duddy67
Copy link

Duddy67 commented May 31, 2024

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant