Homebrew I need help to compile BennuGD for Nintendo Switch

Rufidj

New Member
OP
Newbie
Joined
Jun 15, 2023
Messages
3
Trophies
0
Age
38
XP
79
Country
Spain
Hello!
First of all, sorry for my English, I'm using a translator, I'm new to the forum and I came looking for some help, I'm trying to compile BennuGD for switch, I already have everything installed (devkirpro, dependencies etc..) but it didn't work for me. When compiling, I'm getting several errors that I think is because it can't find certain files, and I think the problem may be in the makefile.
Can someone knowledgeable help me? Here I attach the error that I get when executing make.
Greetings and thanks

Bash:
In file included from C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/types.h:221,
                 from C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/time.h:45,
                 from C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:41:
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:161:3: error: unknown type name '_COND_T'
  161 |   _COND_T   cond;
      |   ^~~~~~~
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:189:3: error: unknown type name '_COND_T'
  189 |   _COND_T  cond;
      |   ^~~~~~~
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:212:3: error: unknown type name '_COND_T'
  212 |   _COND_T  cond_r;
      |   ^~~~~~~
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:213:3: error: unknown type name '_COND_T'
  213 |   _COND_T  cond_w;
      |   ^~~~~~~
In file included from ../../include/files.h:36,
                 from ../include/bgdi.h:55,
                 from C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:43:
../../include/files_st.h:87:5: error: unknown type name 'FILE'
   87 |     FILE *  fp ;
      |     ^~~~
../../include/files.h:95:8: error: unknown type name 'FILE'
   95 | extern FILE * file_fp          (file * fp) ;
      |        ^~~~
../include/bgdi.h:57:10: fatal error: bgdrtm.h: No such file or directory
   57 | #include "bgdrtm.h"
      |          ^~~~~~~~~~

Edit : Makefile

Makefile:
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
endif
TOPDIR ?= $(CURDIR)
include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
# 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
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
#
# NO_ICON: if set to anything, do not use icon.
# NO_NACP: if set to anything, no .nacp file is generated.
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
# ICON is the filename of the icon (.jpg), relative to the project folder.
#   If not set, it attempts to use one of the following (in this order):
#     - <Project name>.jpg
#     - icon.jpg
#     - <libnx folder>/default_icon.jpg
#
# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder.
#   If not set, it attempts to use one of the following (in this order):
#     - <Project name>.json
#     - config.json
#   If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead
#   of a homebrew executable (.nro). This is intended to be used for sysmodules.
#   NACP building is skipped as well.
#---------------------------------------------------------------------------------
TARGET      :=  $(notdir $(CURDIR))
BUILD       :=  build
SOURCES     :=  src
INCLUDES := include -I$(DEVKITPRO)/devkitA64/aarch64-none-elf/include -I$(DEVKITPRO)/devkitA64/lib/gcc/aarch64-none-elf/13.1.0/include -I$(DEVKITPRO)/libnx/include -I$(DEVKITPRO)/portlibs/switch/include -IC:/bennugd/core/include -IC:/bennugd/core/bgdrtm/include -IC:/devkitPro/libnx/include -IC:/bennugd/core/bgdi/include

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH    :=  -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
CFLAGS  :=  `$(PREFIX)pkg-config --cflags sdl2 SDL2_mixer SDL2_image` -Wall -O2 -ffunction-sections \
            $(ARCH) $(DEFINES) -fPIC
CFLAGS  +=  $(INCLUDE) -D__SWITCH__  -IC:/bennugd/core/bgdrtm/include  -IC:/bennugd/core/include
CXXFLAGS    := $(CFLAGS) -fno-rtti -fno-exceptions -fPIC
ASFLAGS :=  -g $(ARCH)
LDFLAGS =   -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
LIBS    :=  `$(PREFIX)pkg-config --libs sdl2 SDL2_mixer SDL2_image SDL2_ttf` \
            -lnx

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS) $(LIBNX)

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT   :=  $(CURDIR)/$(TARGET)
export TOPDIR   :=  $(CURDIR)
export VPATH    :=  $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
            $(foreach dir,$(DATA),$(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)))
BINFILES    :=  $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ and libEGL dependent projects
#---------------------------------------------------------------------------------
export LD   :=  $(CXX)
export OFILES_BIN   :=  $(addsuffix .o,$(BINFILES))
export OFILES_SRC   :=  $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export OFILES   :=  $(OFILES_BIN) $(OFILES_SRC)
export HFILES_BIN   :=  $(addsuffix .h,$(subst .,_,$(BINFILES)))
export INCLUDE  :=  $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
            $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
            -I$(CURDIR)/$(BUILD)
export LIBPATHS :=  $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
ifeq ($(strip $(CONFIG_JSON)),)
    jsons := $(wildcard *.json)
    ifneq (,$(findstring $(TARGET).json,$(jsons)))
        export APP_JSON := $(TOPDIR)/$(TARGET).json
    else
        ifneq (,$(findstring config.json,$(jsons)))
            export APP_JSON := $(TOPDIR)/config.json
        endif
    endif
else
    export APP_JSON := $(TOPDIR)/$(CONFIG_JSON)
endif
ifeq ($(strip $(ICON)),)
    icons := $(wildcard *.jpg)
    ifneq (,$(findstring $(TARGET).jpg,$(icons)))
        export APP_ICON := $(TOPDIR)/$(TARGET).jpg
    else
        ifneq (,$(findstring icon.jpg,$(icons)))
            export APP_ICON := $(TOPDIR)/icon.jpg
        endif
    endif
else
    export APP_ICON := $(TOPDIR)/$(ICON)
endif
ifeq ($(strip $(NO_ICON)),)
    export NROFLAGS += --icon=$(APP_ICON)
endif
ifeq ($(strip $(NO_NACP)),)
    export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp
endif
ifneq ($(APP_TITLEID),)
    export NACPFLAGS += --titleid=$(APP_TITLEID)
endif
ifneq ($(ROMFS),)
    export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
endif
.PHONY: $(BUILD) clean all
#---------------------------------------------------------------------------------
all: $(BUILD)
$(BUILD):
    @[ -d $@ ] || mkdir -p $@
    @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
    @echo clean ...
ifeq ($(strip $(APP_JSON)),)
    @rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf
else
    @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf
endif

#---------------------------------------------------------------------------------
else
.PHONY: all
DEPENDS :=  $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
ifeq ($(strip $(APP_JSON)),)
all :   $(OUTPUT).nro
ifeq ($(strip $(NO_NACP)),)
$(OUTPUT).nro   :   $(OUTPUT).elf $(OUTPUT).nacp
else
$(OUTPUT).nro   :   $(OUTPUT).elf
endif
else
all :   $(OUTPUT).nsp
$(OUTPUT).nsp   :   $(OUTPUT).nso $(OUTPUT).npdm
$(OUTPUT).nso   :   $(OUTPUT).elf
endif
$(OUTPUT).elf   :   $(OFILES)
$(OFILES_SRC)   : $(HFILES_BIN)
#---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data
#---------------------------------------------------------------------------------
%.bin.o %_bin.h :   %.bin
#---------------------------------------------------------------------------------
    @echo $(notdir $<)
    @$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------

I'm sure you'll find serious errors, it's the first time I've tried to compile something this big. :wacko:
 
Last edited by Rufidj,

Rufidj

New Member
OP
Newbie
Joined
Jun 15, 2023
Messages
3
Trophies
0
Age
38
XP
79
Country
Spain
@Rufidj
Please add something like "I need help to compile BennuGD for Nintendo Switch" to the head of your topic. :unsure:
You're right I'm sorry
But it won't let me edit the title.
(what a bad way to start in a forum)
Post automatically merged:

Hello!
It seems that this progresses a bit, now the bash returns me more things although the previous error continues to appear, what I did for this was add to the include of the makefile some absolute path.

Bash:
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:161:3: error: unknown type name '_COND_T'
  161 |   _COND_T   cond;
      |   ^~~~~~~
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:189:3: error: unknown type name '_COND_T'
  189 |   _COND_T  cond;
      |   ^~~~~~~
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:212:3: error: unknown type name '_COND_T'
  212 |   _COND_T  cond_r;
      |   ^~~~~~~
C:/devkitPro/devkitA64/aarch64-none-elf/include/sys/_pthreadtypes.h:213:3: error: unknown type name '_COND_T'
  213 |   _COND_T  cond_w;
      |   ^~~~~~~
In file included from ../../include/files.h:36,
                 from C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/include/bgdi.h:54,
                 from C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:42:
../../include/files_st.h:87:5: error: unknown type name 'FILE'
   87 |     FILE *  fp ;
      |     ^~~~
../../include/files.h:95:8: error: unknown type name 'FILE'
   95 | extern FILE * file_fp          (file * fp) ;
      |        ^~~~
In file included from C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:45:
../../include/dirs.h:74:15: error: field 'crtime' has incomplete type
   74 |     struct tm crtime; /* creation time (unix not available) */
      |               ^~~~~~
../../include/dirs.h:75:15: error: field 'mtime' has incomplete type
   75 |     struct tm mtime; /* last modification time */
      |               ^~~~~
../../include/dirs.h:76:15: error: field 'atime' has incomplete type
   76 |     struct tm atime; /* last access time */
      |               ^~~~~
../../include/dirs.h:77:15: error: field 'ctime' has incomplete type
   77 |     struct tm ctime; /* last status change time (windows not available) */
      |               ^~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c: In function 'main':
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:87:21: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   87 |     ptr = argv[0] + strlen( argv[0] );
      |                     ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:46:1: note: include '<string.h>' or provide a declaration of 'strlen'
   45 | #include "dirs.h"
  +++ |+#include <string.h>
   46 |
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:87:21: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   87 |     ptr = argv[0] + strlen( argv[0] );
      |                     ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:87:21: note: include '<string.h>' or provide a declaration of 'strlen'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:89:18: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
   89 |     appexename = strdup( ptr );
      |                  ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:89:18: warning: incompatible implicit declaration of built-in function 'strdup' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:93:13: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration]
   93 |     if ( ( !strchr( argv[0], '\\' ) && !strchr( argv[0], '/' ) ) && !file_exists( appexefullpath ) )
      |             ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:93:13: note: include '<string.h>' or provide a declaration of 'strchr'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:93:13: warning: incompatible implicit declaration of built-in function 'strchr' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:93:13: note: include '<string.h>' or provide a declaration of 'strchr'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:100:13: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
  100 |             sprintf( tmp, "%s/%s", p, appexename );
      |             ^~~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:46:1: note: include '<stdio.h>' or provide a declaration of 'sprintf'
   45 | #include "dirs.h"
  +++ |+#include <stdio.h>
   46 |
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:100:13: warning: incompatible implicit declaration of built-in function 'sprintf' [-Wbuiltin-declaration-mismatch]
  100 |             sprintf( tmp, "%s/%s", p, appexename );
      |             ^~~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:100:13: note: include '<stdio.h>' or provide a declaration of 'sprintf'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:107:11: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
  107 |     ptr = strstr( appexefullpath, appexename );
      |           ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:107:11: note: include '<string.h>' or provide a declaration of 'strstr'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:107:11: warning: incompatible implicit declaration of built-in function 'strstr' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:107:11: note: include '<string.h>' or provide a declaration of 'strstr'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:109:5: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
  109 |     strncpy( appexepath, appexefullpath, ptr - appexefullpath );
      |     ^~~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:109:5: note: include '<string.h>' or provide a declaration of 'strncpy'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:109:5: warning: incompatible implicit declaration of built-in function 'strncpy' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:109:5: note: include '<string.h>' or provide a declaration of 'strncpy'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:150:18: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
  150 |             if ( strcmp( dcb_signature.magic, DCB_STUB_MAGIC ) == 0 )
      |                  ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:150:18: note: include '<string.h>' or provide a declaration of 'strcmp'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:33: warning: implicit declaration of function 'fprintf' [-Wimplicit-function-declaration]
  187 |                                 fprintf( stderr, "You must provide a directory" ) ;
      |                                 ^~~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:33: note: include '<stdio.h>' or provide a declaration of 'fprintf'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:33: warning: incompatible implicit declaration of built-in function 'fprintf' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:33: note: include '<stdio.h>' or provide a declaration of 'fprintf'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:42: error: 'stderr' undeclared (first use in this function)
  187 |                                 fprintf( stderr, "You must provide a directory" ) ;
      |                                          ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:42: note: 'stderr' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:187:42: note: each undeclared identifier is reported only once for each function it appears in
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:205:41: warning: implicit declaration of function 'memmove' [-Wimplicit-function-declaration]
  205 |                     if ( i < argc - 1 ) memmove( &argv[i], &argv[i+1], sizeof( char* ) * ( argc - i - 1 ) ) ;
      |                                         ^~~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:205:41: note: include '<string.h>' or provide a declaration of 'memmove'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:205:41: warning: incompatible implicit declaration of built-in function 'memmove' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:205:41: note: include '<string.h>' or provide a declaration of 'memmove'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:214:13: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
  214 |             printf( BGDI_VERSION "\n"
      |             ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:214:13: note: include '<stdio.h>' or provide a declaration of 'printf'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:214:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:214:13: note: include '<stdio.h>' or provide a declaration of 'printf'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:254:5: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
  254 |     strcpy( dcbname, filename ) ;
      |     ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:254:5: note: include '<string.h>' or provide a declaration of 'strcpy'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:254:5: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:254:5: note: include '<string.h>' or provide a declaration of 'strcpy'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:273:17: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
  273 |                 strcat( dcbname, *dcbext ) ;
      |                 ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:273:17: note: include '<string.h>' or provide a declaration of 'strcat'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:273:17: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch]
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:273:17: note: include '<string.h>' or provide a declaration of 'strcat'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:280:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
  280 |                 printf( "%s: doesn't exist or isn't version %d DCB compatible\n", filename, DCB_VERSION >> 8 ) ;
      |                 ^~~~~~
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:280:17: note: include '<stdio.h>' or provide a declaration of 'printf'
C:/devkitPro/examples/switch/bennugd-monolithic/core/bgdi/src/main.c:83:16: warning: variable 'mainproc_running' set but not used [-Wunused-but-set-variable]
   83 |     INSTANCE * mainproc_running;
      |                ^~~~~~~~~~~~~~~~
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:22: main.o] Error 1
make: *** [Makefile:158: build] Error 2
Post automatically merged:

Hello!
I got here, it tells me undefined reference to... but if they are referenced in another file that seems to be being included from main.c, I don't understand what could be happening.

Bash:
linking bgdi.elf
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.o: in function `main':
main.c:(.text.startup.main+0x68): undefined reference to `appexename'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x6c): undefined reference to `appexename'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x7c): undefined reference to `getfullpath'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x80): undefined reference to `appexefullpath'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x84): undefined reference to `appexefullpath'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0xb0): undefined reference to `appexepath'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0xb4): undefined reference to `appexepath'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0xb8): undefined reference to `appname'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0xbc): undefined reference to `appname'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x114): undefined reference to `strncmpi'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x128): undefined reference to `file_addp'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x144): undefined reference to `debug'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x148): undefined reference to `debug'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x200): undefined reference to `file_addp'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x220): undefined reference to `string_init'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x228): undefined reference to `init_c_type'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x270): undefined reference to `dcb_load_from'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x274): undefined reference to `dcb'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x278): undefined reference to `dcb'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x284): undefined reference to `debug'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x288): undefined reference to `debug'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x290): undefined reference to `sysproc_init'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x2a0): undefined reference to `bgdrtm_entry'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x2a4): undefined reference to `mainproc'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x2a8): undefined reference to `mainproc'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x2bc): undefined reference to `instance_new'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x2c0): undefined reference to `instance_go_all'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x2cc): undefined reference to `bgdrtm_exit'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x34c): undefined reference to `dcb_load'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x380): undefined reference to `dcb_load'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x3b8): undefined reference to `file_open'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x3d0): undefined reference to `file_seek'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x3e4): undefined reference to `file_read'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x430): undefined reference to `file_exists'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x454): undefined reference to `file_addp'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x468): undefined reference to `whereis'
C:/devkitPro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld.exe: main.c:(.text.startup.main+0x4c4): undefined reference to `getfullpath'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:81: /c/bennugd/core/bgdi/bgdi.elf] Error 1
 
Last edited by Rufidj,
  • Like
Reactions: mathew77

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    Any new teeth?
  • K3Nv2 @ K3Nv2:
    Fillings for now fighting with them for a stronger material then the power goes out when they're on the phone with insurance
  • K3Nv2 @ K3Nv2:
    They do have a few hotties in there I wouldn't mind rizzing
  • Veho @ Veho:
    "Hey babe. Check out my grill."
  • Veho @ Veho:
    "I know, I helped install it."
  • K3Nv2 @ K3Nv2:
    Now get your finger back in my mouth
  • BigOnYa @ BigOnYa:
    "How about you let me give you a filling."
  • Veho @ Veho:
    "You can't afford
    it."
    +1
  • K3Nv2 @ K3Nv2:
    I got insurance it covers 10%
    +1
  • K3Nv2 @ K3Nv2:
    Power outage who just drilled me
  • K3Nv2 @ K3Nv2:
    The mold thing they clamp your teeth down with feels so werid at first
  • K3Nv2 @ K3Nv2:
    On the bright side got my order in for my new instant pot so that's nice
    +1
  • BigOnYa @ BigOnYa:
    Instant pots are so nice, I use mine prob every other day. Kraft mac n cheese in 6 mins, no draining macaroni at all needed.
  • K3Nv2 @ K3Nv2:
    I got the crock pot one
  • BigOnYa @ BigOnYa:
    They are all crock pots, and steamers, and pressure cookers.
  • BigOnYa @ BigOnYa:
    Oh, yea that one is different. Nvm.
  • Psionic Roshambo @ Psionic Roshambo:
    @K3Nv2, instant slow cooks lol
    +1
  • DexterYeen @ DexterYeen:
    instant high
  • BigOnYa @ BigOnYa:
    You don't need to be getting high no more, stay on ground level
  • K3Nv2 @ K3Nv2:
    Psi doesn't need cooking appliances since mother nature is trying to off him
    +1
  • BigOnYa @ BigOnYa:
    In FL, you just find a flat rock outside.
  • K3Nv2 @ K3Nv2:
    In Florida mother nature eats you
    +1
  • BigOnYa @ BigOnYa:
    I feel bad for all those people that just cleaned up after last hurricane, then this comes right after.
  • K3Nv2 @ K3Nv2:
    God knows what they been up to
    K3Nv2 @ K3Nv2: God knows what they been up to