Homebrew I need help to compile BennuGD for Nintendo Switch

Rufidj

New Member
OP
Newbie
Joined
Jun 15, 2023
Messages
3
Trophies
0
Age
39
XP
89
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
39
XP
89
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
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @kijetesantakalu042, It won't happen for another five years.
  • K3Nv3 @ K3Nv3:
    Why not just make the switch 4
  • kijetesantakalu042 @ kijetesantakalu042:
    @SylverReZ I'm preparing for the rumour mill. It'd also be kinda funny
    +1
  • K3Nv3 @ K3Nv3:
    Make switch 2 flashcards for pre-order make millions
    +2
  • K3Nv3 @ K3Nv3:
    https://youtube.com/shorts/dsrip3Gd_0Y yearlater this videos relatable to switch 2
    +1
  • NinStar @ NinStar:
    I don't know a single person who said they hated the switch when it originally got announced
  • NinStar @ NinStar:
    hybrid consoles were a new thing to the mainstream audience, almost everyone liked it
  • NinStar @ NinStar:
    now everyone is doing it, it isn't new anymore, so it makes sense there's a lot of people who don't give a fuck about the switch 2
  • K3Nv3 @ K3Nv3:
    Nah it'll just take one awesome game or hack and it'll sell millions
  • NinStar @ NinStar:
    yes, it will sell millions of course, but it will be very difficult for them to repeat the same numbers as games like mario kart 8 deluxe, breath of the wild and animal crossing, mind you that all of them only sold insanely well due to very specific circumstances in their favor, there are countless first party games that did not pass the 10 million mark, some not even the 5 million
  • K3Nv3 @ K3Nv3:
    Nintendos entire catalog has been a refresh of what it already has making people buy it
  • K3Nv3 @ K3Nv3:
    It use to be like halo just being on Xbox people bought it just for that
  • NinStar @ NinStar:
    something that actually shocked me was seeing nintendo abandoning their own games shortly after releasing them, some of which almost totally relies on online content, like super mario maker 2, I didn't understand why the fuck they would update a game like super mario party years after it release to add content but not super mario maker 2
    +1
  • NinStar @ NinStar:
    then I saw the sales of both games, super mario party sold almost 3x more than super mario maker 2
  • NinStar @ NinStar:
    I actually expected super mario maker 2 to have sold much more, it sold twice as much as the wii u version, but still way less than you would expect for a console with the install base the switch has
  • K3Nv3 @ K3Nv3:
    It has the same thought process as the last so people didn't really get into it until they learned servers could be shut off imo
  • K3Nv3 @ K3Nv3:
    Plus mechanics kinda sucked in smm2
  • NinStar @ NinStar:
    I'm saying this because there is a lot of first party games on switch in similar situation, they are far from being a failure, but for nintendo it probably wasn't good enough compared to the heavy hits that sold 20 million+
  • K3Nv3 @ K3Nv3:
    Either way switch 2 will probably be far from a failure just a rinse and repeat like all their other consoles and games
  • BigOnYa @ BigOnYa:
    Bark bark bark, get out my yard kitty.
  • NinStar @ NinStar:
    what the dog doing
  • BigOnYa @ BigOnYa:
    Humping your leg
  • BigOnYa @ BigOnYa:
    Ok I'm done now. You got a cigarette?
  • Xdqwerty @ Xdqwerty:
    good night
    Xdqwerty @ Xdqwerty: good night