Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gabertho

Pages: [1]
1
General / error generating makefile .exe file
« on: June 23, 2021, 10:32:59 pm »
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.

Pages: [1]
anything