Page 1 of 1

Undefined reference to `__getreent' when attempting to compile

Posted: Fri Jan 20, 2023 5:58 am
by Jonko
Hi folks,

I apologize in advance as the errors I'm getting clearly indicate that I've gone horribly wrong somewhere.

I'm using the latest release of devkitARM to compile & assemble code for a translation patch. Most of the code I've written doesn't use libnds at all, but I want to be able to write to the OAM and figured using setOAM would be my best option.

I wrote logoSetPalette.c like so:

Code: Select all

#include <nds.h>
#include <nds/arm9/sprite.h>

int logoSetPalette()
{
    for (int i = 0; i < 8; i++)
    {
        oamSetPalette(&oamMain, i, 14);     
    }

    return 0;
}
I'm prepping the code using the following makefile (I pass in TARGET and SOURCES when calling make):

Code: Select all

#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------

ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif

#---------------------------------------------------------------------------------
# canned command sequence for binary data
#---------------------------------------------------------------------------------
define bin2o
	bin2s $< | $(AS) -o $(@)
	echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h
	echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h
	echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(<F) | tr . _)`.h
endef


#---------------------------------------------------------------------------------
# path to tools
#---------------------------------------------------------------------------------
export PORTLIBS	:=	$(DEVKITPRO)/portlibs/arm
export PATH		:=	$(DEVKITARM)/bin:$(PORTLIBS)/bin:$(PATH)
LIBNDS	:=	$(DEVKITPRO)/libnds

#---------------------------------------------------------------------------------
# the prefix on the compiler executables
#---------------------------------------------------------------------------------
PREFIX		:=	arm-none-eabi-

export CC	:=	$(PREFIX)gcc
export CXX	:=	$(PREFIX)g++
export AS	:=	$(PREFIX)as
export AR	:=	$(PREFIX)ar
export OBJCOPY	:=	$(PREFIX)objcopy
export OBJDUMP	:=	$(PREFIX)objdump
export LD	:=	$(PREFIX)ld


#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
# DATA is a list of directories containing binary files embedded using bin2o
# GRAPHICS is a list of directories containing image files to be converted with grit
#---------------------------------------------------------------------------------
TARGET		?=	
BUILD		?=  build	
SOURCES		?=	
INCLUDES	:=	include
DATA		:=	data  
GRAPHICS	:=	gfx  

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH	:=	

CFLAGS	:=	-g -Wall -O2\
 		-march=armv5te -mtune=arm946e-s -fomit-frame-pointer\
		-ffast-math -fshort-wchar \
		$(ARCH)

CFLAGS	+=	$(INCLUDE) -DARM9 -nodefaultlibs -I. -fno-builtin -c
CXXFLAGS	:= $(CFLAGS) -fno-rtti -fno-exceptions

ASFLAGS	:=	-g $(ARCH)
ifdef NEWSYM
SYMBOLST := -T $(shell dirname $(CURDIR))/$(shell dirname $(shell dirname $(SOURCES)))/symbols.x $(shell dirname $(CURDIR))/$(shell dirname $(shell dirname $(SOURCES)))/arm9_newcode.x
NEWSYMT :=  -T $(shell dirname $(CURDIR))/$(NEWSYM)
else
SYMBOLST := -T $(shell dirname $(CURDIR))/$(shell dirname $(SOURCES))/symbols.x $(shell dirname $(CURDIR))/$(shell dirname $(SOURCES))/arm9_newcode.x
NEWSYMT := 
endif
LDFLAGS	=	$(SYMBOLST) -T $(shell dirname $(CURDIR))/linker.x $(NEWSYMT) -g $(ARCH) -Map newcode.map

ifdef CODEADDR
  LDFLAGS += -Ttext $(CODEADDR)
endif

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (order is important)
#---------------------------------------------------------------------------------
LIBS	:= -lnds9 -lc -lgcc
 
 
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS	:=	$(LIBNDS)  $(DEVKITARM) $(DEVKITARM)/arm-none-eabi 

#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUT	:=	$(CURDIR)/$(TARGET)

export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
					$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
					$(foreach dir,$(GRAPHICS),$(CURDIR)/$(dir))

export DEPSDIR	:=	$(CURDIR)/$(BUILD)

CFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES	:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
PNGFILES	:=	$(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.png)))
BINFILES	:=	$(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))

export OFILES	:=	$(addsuffix .o,$(BINFILES)) \
					$(PNGFILES:.png=.o) \
					$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
 
export INCLUDE	:=	$(foreach dir,$(INCLUDES),-iquote $(CURDIR)/$(dir)) \
					$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
					-I$(CURDIR)/$(BUILD)
 
export LIBPATHS	:=	$(foreach dir,$(LIBDIRS),-L$(dir)/lib) -L$(DEVKITARM)/lib/gcc/arm-none-eabi/12.2.0

 
.PHONY: $(BUILD) clean
  
#---------------------------------------------------------------------------------
$(BUILD):
	@[ -d $@ ] || mkdir -p $@
	@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
 
#---------------------------------------------------------------------------------
clean:
	@echo clean ...
	@rm -fr $(BUILD) $(TARGET).elf $(TARGET).nds

#---------------------------------------------------------------------------------
else
 
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------

all: $(OUTPUT).bin $(OUTPUT).sym

$(OUTPUT).bin : $(OUTPUT).elf
	$(OBJCOPY) -O binary $< $@
	@echo built ... $(notdir $@)

$(OUTPUT).sym : $(OUTPUT).elf
	$(OBJDUMP) -t $< > $@
	@echo written the symbol table ... $(notdir $@)
	
#---------------------------------------------------------------------------------
%.elf: $(OFILES)
	@echo linking $(notdir $@)
	$(LD)  $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@

#---------------------------------------------------------------------------------
%.bin.o	:	%.bin
#---------------------------------------------------------------------------------
	@echo $(notdir $<)
	$(bin2o)
	
#---------------------------------------------------------------------------------
%.o: %.cpp
	@echo $(notdir $<)
	$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
	
#---------------------------------------------------------------------------------
%.o: %.c
	@echo $(notdir $<)
	$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@ $(ERROR_FILTER)
	
#---------------------------------------------------------------------------------
%.o: %.s
	@echo $(notdir $<)
	$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)

#---------------------------------------------------------------------------------
# This rule creates assembly source files using grit
# grit takes an image file and a .grit describing how the file is to be processed
# add additional rules like this for each image extension
# you use in the graphics folders
#---------------------------------------------------------------------------------
%.s %.h   : %.png %.grit
#---------------------------------------------------------------------------------
	grit $< -fts -o$*

-include $(DEPSDIR)/*.d
 
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------
	
When I run make, it says it's running these commands:

Code: Select all

arm-none-eabi-gcc -MMD -MP -MF /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/build/logoSetPalette.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -fshort-wchar  -iquote /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/source -I/opt/devkitpro/libnds/include -I/opt/devkitpro/devkitARM/include -I/opt/devkitpro/devkitARM/arm-none-eabi/include -I/home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/build -DARM9 -nodefaultlibs -I. -fno-builtin -c -c /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/source/logoSetPalette.c -o logoSetPalette.o
main_0001.s
arm-none-eabi-gcc -MMD -MP -MF /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/build/main_0001.d -x assembler-with-cpp -g  -c /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/source/main_0001.s -o main_0001.o
linking newcode.elf
arm-none-eabi-ld  -T /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/symbols.x /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/arm9_newcode.x -T /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/linker.x  -g  -Map newcode.map -Ttext 0x20C7AA4    logoSetPalette.o main_0001.o -L/opt/devkitpro/libnds/lib -L/opt/devkitpro/devkitARM/lib -L/opt/devkitpro/devkitARM/arm-none-eabi/lib -L/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/12.2.0 -lnds9 -lc -lgcc -o /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/newcode.elf
But then I get this block of errors:

Code: Select all

C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/libnds/lib\libnds9.a(sassert.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/libnds/lib\libnds9.a(console.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/libnds/lib\libnds9.a(sprite.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/libnds/lib\libnds9.a(background.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/libnds/lib\libnds9.a(trig.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/libnds/lib\libnds9.a(sprite_alloc.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-bsearch.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-iprintf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-malloc.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mallocr.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-memcpy-stub.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-memset.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mlock.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-realloc.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-reallocr.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-setvbuf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-siscanf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-stdio.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strlen-stub.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-svfiscanf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-ungetc.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-vfiprintf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-viprintf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wcrtomb.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wcsrtombs.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wsetup.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-ctype_.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fflush.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-freer.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fvwrite.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fwalk.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-impure.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-iswspace.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-localeconv.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-locale.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-makebuf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mbrtowc.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mbtowc_r.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-memchr-stub.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-memmove.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-sccl.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strcasecmp.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strcat.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strchr.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strcpy.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strlcpy.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strncasecmp.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strncpy.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtoll.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtol.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtoull.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtoul.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-svfiprintf.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wcsnrtombs.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wctomb_r.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-errno.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fclose.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-getenv_r.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-iswspace_l.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-jp2uc.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strncmp.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-categories.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-environ.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-envlock.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/devkitPro/devkitARM/lib/gcc/arm-none-eabi/12.2.0\libgcc.a(_udivmoddi4.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: warning: C:/Users/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/newcode.elf has a LOAD segment with RWX permissions
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/libnds/lib\libnds9.a(console.o): in function `consoleDebugInit':
/home/davem/projects/devkitpro/pacman-packages/libnds/src/libnds-1.8.2/arm9/../source/arm9/console.c:560: undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: /home/davem/projects/devkitpro/pacman-packages/libnds/src/libnds-1.8.2/arm9/../source/arm9/console.c:552: undefined reference to `devoptab_list'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/libnds/lib\libnds9.a(console.o): in function `consoleInit':
/home/davem/projects/devkitpro/pacman-packages/libnds/src/libnds-1.8.2/arm9/../source/arm9/console.c:488: undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: /home/davem/projects/devkitpro/pacman-packages/libnds/src/libnds-1.8.2/arm9/../source/arm9/console.c:489: undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: /home/davem/projects/devkitpro/pacman-packages/libnds/src/libnds-1.8.2/arm9/../source/arm9/console.c:497: undefined reference to `devoptab_list'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-iprintf.o): in function `iprintf':
(.text.iprintf+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-malloc.o): in function `malloc':
(.text.malloc+0x8): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-malloc.o): in function `free':
(.text.free+0x8): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mallocr.o): in function `_malloc_r':
(.text._malloc_r+0x2b0): undefined reference to `_sbrk_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._malloc_r+0x628): undefined reference to `_sbrk_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._malloc_r+0x6dc): undefined reference to `_sbrk_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mlock.o): in function `__malloc_lock':
(.text.__malloc_lock+0x8): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mlock.o): in function `__malloc_unlock':
(.text.__malloc_unlock+0x8): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-realloc.o): in function `realloc':
(.text.realloc+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-setvbuf.o): in function `setvbuf':
(.text.setvbuf+0x18): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.setvbuf+0x170): undefined reference to `__flockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.setvbuf+0x1c4): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.setvbuf+0x220): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-siscanf.o): in function `siscanf':
(.text.siscanf+0x4c): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-stdio.o): in function `__sread':
(.text.__sread+0xc): undefined reference to `_read_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-stdio.o): in function `__swrite':
(.text.__swrite+0x3c): undefined reference to `_write_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__swrite+0x60): undefined reference to `_lseek_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-stdio.o): in function `__sseek':
(.text.__sseek+0x18): undefined reference to `_lseek_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-stdio.o): in function `__sclose':
(.text.__sclose+0x8): undefined reference to `_close_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-ungetc.o): in function `_ungetc_r':
(.text._ungetc_r+0x17c): undefined reference to `__flockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._ungetc_r+0x19c): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._ungetc_r+0x208): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-ungetc.o): in function `ungetc':
(.text.ungetc+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-vfiprintf.o): in function `_vfiprintf_r':
(.text._vfiprintf_r+0x60): undefined reference to `__flockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._vfiprintf_r+0xc8): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._vfiprintf_r+0x10c): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._vfiprintf_r+0x22f8): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-vfiprintf.o): in function `vfiprintf':
(.text.vfiprintf+0x10): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-vfiprintf.o): in function `__sbprintf':
(.text.__sbprintf+0x70): undefined reference to `__libc_lock_init_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sbprintf+0xbc): undefined reference to `__libc_lock_close_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-viprintf.o): in function `viprintf':
(.text.viprintf+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wcrtomb.o): in function `wcrtomb':
(.text.wcrtomb+0x14): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wcsrtombs.o): in function `wcsrtombs':
(.text.wcsrtombs+0x18): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-wsetup.o): in function `__swsetup_r':
(.text.__swsetup_r+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fflush.o): in function `_fflush_r':
(.text._fflush_r+0x80): undefined reference to `__flockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._fflush_r+0x8c): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fflush.o): in function `fflush':
(.text.fflush+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__fp_lock':
(.text.__fp_lock+0x24): undefined reference to `__flockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__fp_unlock':
(.text.__fp_unlock+0x24): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__sinit':
(.text.__sinit+0xc): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sinit+0x98): undefined reference to `__libc_lock_init_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sinit+0xec): undefined reference to `__libc_lock_init_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sinit+0x140): undefined reference to `__libc_lock_init_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sinit+0x150): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sinit+0x160): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__sfp':
(.text.__sfp+0xc): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sfp+0x64): undefined reference to `__libc_lock_init_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sfp+0x6c): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__sfp+0x11c): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__sfp_lock_acquire':
(.text.__sfp_lock_acquire+0x8): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__sfp_lock_release':
(.text.__sfp_lock_release+0x8): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__sinit_lock_acquire':
(.text.__sinit_lock_acquire+0x8): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__sinit_lock_release':
(.text.__sinit_lock_release+0x8): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__fp_lock_all':
(.text.__fp_lock_all+0x8): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__fp_lock_all+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-findfp.o): in function `__fp_unlock_all':
(.text.__fp_unlock_all+0x4): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__fp_unlock_all+0x14): undefined reference to `__libc_lock_release_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-freer.o): in function `_malloc_trim_r':
(.text._malloc_trim_r+0x48): undefined reference to `_sbrk_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._malloc_trim_r+0x78): undefined reference to `_sbrk_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._malloc_trim_r+0xc0): undefined reference to `_sbrk_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-locale.o): in function `setlocale':
(.text.setlocale+0xc): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-makebuf.o): in function `__smakebuf_r':
(.text.__smakebuf_r+0x4c): undefined reference to `_fstat_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text.__smakebuf_r+0x11c): undefined reference to `_isatty_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-makebuf.o): in function `__swhatbuf_r':
(.text.__swhatbuf_r+0x24): undefined reference to `_fstat_r'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-mbrtowc.o): in function `mbrtowc':
(.text.mbrtowc+0x18): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtoll.o): in function `strtoll_l':
(.text.strtoll_l+0x10): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtoll.o): in function `strtoll':
(.text.strtoll+0x10): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtol.o): in function `strtol_l':
(.text.strtol_l+0x10): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtol.o): in function `strtol':
(.text.strtol+0x10): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-strtoull.o):(.text.strtoull_l+0x10): more undefined references to `__getreent' follow
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fclose.o): in function `_fclose_r':
(.text._fclose_r+0xd8): undefined reference to `__libc_lock_close_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._fclose_r+0x120): undefined reference to `__flockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._fclose_r+0x140): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: (.text._fclose_r+0x15c): undefined reference to `__funlockfile'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-fclose.o): in function `fclose':
(.text.fclose+0x8): undefined reference to `__getreent'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-envlock.o): in function `__env_lock':
(.text.__env_lock+0x8): undefined reference to `__libc_lock_acquire_recursive'
C:\devkitPro\devkitARM\bin\arm-none-eabi-ld.exe: C:/devkitPro/devkitARM/arm-none-eabi/lib\libc.a(lib_a-envlock.o): in function `__env_unlock':
(.text.__env_unlock+0x8): undefined reference to `__libc_lock_release_recursive'
ERROR: make[1]: *** [/home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/Makefile:156: /home/jonko/source/repos/ChokuretsuTranslationBuild/src/overlays/main_0001/newcode.elf] Error 1
rm main_0001.o logoSetPalette.o
ERROR: make: *** [Makefile:129: build] Error 2
It seems like I haven't imported some obviously critical library since the linker's not able to resolve very basic references, but I'm not sure what I'm missing. Any pointers would be greatly appreciated.

Re: Undefined reference to `__getreent' when attempting to compile

Posted: Thu Apr 20, 2023 2:09 pm
by WinterMute
I wouldn't recommend trying to link libnds into a project like this tbh. It's not really designed to be used for rom hacking. If you're only using headers for register definitions and some of the inline functions defined there it should be fine provided you define NDEBUG to avoid pulling in things like the code to display assert messages.

remove -lnds9 from the LIBS line "-L$(DEVKITARM)/lib/gcc/arm-none-eabi/12.2.0" from the LIBPATHS line and both of "$(DEVKITARM) $(DEVKITARM)/arm-none-eabi" from the LIBDIRS line.

See how that goes.