I've been trying to get into DS Homebrew recently using the DevKitPro and learning the ropes by tweaking some of the example files. In this case I was trying to tweak the 256*256 Bitmap example to display a different image and some text, here is my current code
#include <nds.h>
#include <stdio.h>
// This tells the program to include the image
#include "drunkenlogo.h"
int main(void){
//Sets the correct modes
videoSetMode(MODE_5_2D);
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
//Starts the console
consoleDemoInit();
//Prints text to the screen
iprintf("256X256 BITMAP BACKGROUND TEST\n");
iprintf("PRESS START TO END");
//idk what this does
int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0);
//idk what this does either
dmaCopy(drunkenlogoBitmap, bgGetGfxPtr(bg3), 256*256);
dmaCopy(drunkenlogoPal, BG_PALETTE, 256*2);
while(1) {
swiWaitForVBlank();
scanKeys();
if (keysDown()&KEY_START) break;
}
Whenever I try to make it it gives me this error
linking 256_color_bmp.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-
eabi/bin/ld.exe: main.o: in function `main':
C:/devkitPro/libnds/include/nds/arm9/background.h:911: undefined reference to `d
runkenlogoBitmap'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-
eabi/bin/ld.exe: main.o: in function `bgGetGfxPtr':
C:/devkitPro/libnds/include/nds/arm9/background.h:911: undefined reference to `d
runkenlogoPal'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitARM/ds_rules:54: /opt/devkitpro/examples/nds/
Graphics/Backgrounds/256_color_bmp/256_color_bmp.elf] Error 1
make: *** [Makefile:103: build] Error 2
The image I'm trying to link is attached to this post. Can someone help solve my issue?
Image
https://drive.google.com/file/d/1SzEbzpFI4GeSpevtNmOz9b5YtPml2TbA/view?usp=sharing