Hi, since the past week, i've been working on a Wii console app test that runs on HomeBrew Channel, the code its prefectly fine but when I try to compile the code with MINGW64 with all of the headers in the right folder, the compiler of DevkitPro just says that the headers were not found, anyone can help me?
This is the C++ code:
#include <gccore.h>
#include <wiiuse/wpad.h>
#include <cstdio>
int main(int argc, char **argv) {
VIDEO_Init();
CON_Init(NULL, 32, 64, 640, 480, 256);
WPAD_Init();
std::printf("====================================\n");
std::printf("Welcome to the terminal!\n");
std::printf("====================================\n");
std::printf("To exit, press HOME\n\n");
while (true) {
u32 pressed_buttons = WPAD_ButtonsDown(0);
if (pressed_buttons & WPAD_BUTTON_HOME) {
std::printf("Closing terminal...");
break;
}
VIDEO_WaitVSync();
}
return 0;
}
This is the Makefile:
export DEVKITPRO := D:/DevkitPro
export DEVKITPPC := D:/DevkitPro/devkitPPC
export PORTLIBS := D:/DevkitPro/portlibs/wii
ifeq ($(strip $(DEVKITPRO)),)
$(error "Por favor, define la variable de entorno DEVKITPRO en tu sistema")
endif
include $(DEVKITPRO)/devkitPPC/wii_rules
TARGET := WiiRepoClient
DEBUG := 0
SOURCES := source
INCLUDES := include
CFLAGS := -g -O2 -Wall -DGEKKO -D__wii__ $(MACHDEP)
CXXFLAGS := $(CFLAGS) -std=c++23 -fno-exceptions -fno-rtti
LIBS := -lfreetype -lpng -lz -lwiiuse -lfat -logc -lm
LIBDIRS := $(PORTLIBS)/lib $(LIBOGC_LIB)
INCDIRS := $(PORTLIBS)/include $(DEVKITPRO)/libogc/include $(LIBOGC_INC) $(INCLUDES)
all: $(BUILD)
Compilacion finalizada con exito.
ifneq ($(BUILD),$(notdir $(CURDIR)))
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
export OFILES := $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
export INCLUDE := $(foreach dir,$(INCDIRS),-I$(CURDIR)/$(dir) -I$(dir))
.PHONY: $(BUILD) clean all
$(BUILD):
@[ -d $@ ] || mkdir -p $@
--no-print-directory -C $@ -f $(CURDIR)/Makefile
clean:
Eliminando archivos temporales viejos...
-rf $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
else
DEPENDS := $(OFILES:.o=.d)
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
-include $(DEPENDS)
endif
And yes, the includes are inside a folder called "include".