Hey guys, I'm having some trouble with the release of my game in the Windows OS. I have this makefile code:
CXX := g++
CXX_FLAGS := -Wall -Wextra -Wno-unused-parameter -std=c++17 -ggdb
BIN := bin
SRC := src
INCLUDE := include
LIB := lib
LIBRARIES := -lsfml-graphics -lsfml-audio -lsfml-window -lsfml-system
EXECUTABLE := main
MKDIR_P = mkdir -p
.PHONY: directories
all: directories $(BIN)/$(EXECUTABLE)
directories: ${BIN}
${BIN}:
${MKDIR_P} ${BIN}
run: clean all
clear
./$(BIN)/$(EXECUTABLE)
$(BIN)/$(EXECUTABLE): $(SRC)/*.cpp
$(CXX) $(CXX_FLAGS) -I$(INCLUDE) -L$(LIB) $^ -o $@ $(LIBRARIES)
clean:
-rm $(BIN)/*
So, when I'm in the VSCode IDE and I type make and then bin/main.exe, the game open and everything works properly. But, when I enter the game paste and try to open the game by clicking the main.exe file, it shows a error message as if the dlls couldn't be found. I can't figure out why this, since I can open the game in the terminal but not clicking the .exe file.