Im getting the "undefined reference to [i]function[/i] when using citro2d
Posted: Fri Mar 20, 2020 8:00 pm
I was testing some stuff will citro2d, but when i compile it, cmd return these errors
I have added the <citro2d.h> and <citro3d.h> headers and this still persists
Code: Select all
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `main':
C:/Users/<usrnme>/Desktop/ShinMegamiGinsei/source/main.cpp:16: undefined reference to `C2D_Init'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: C:/Users/<usrnme>/Desktop/ShinMegamiGinsei/source/main.cpp:17: undefined reference to `C2D_Prepare'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: C:/Users/<usrnme>/Desktop/ShinMegamiGinsei/source/main.cpp:25: undefined reference to `C2D_CreateScreenTarget'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: C:/Users/<usrnme>/Desktop/ShinMegamiGinsei/source/main.cpp:34: undefined reference to `C2D_TargetClear'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `C2D_SceneBegin':
C:/devkitPro/libctru/include/c2d/base.h:243: undefined reference to `C2D_Flush'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `C2D_SceneTarget':
C:/devkitPro/libctru/include/c2d/base.h:222: undefined reference to `C2D_SceneSize'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `main':
C:/Users/<usrnme>/Desktop/ShinMegamiGinsei/source/main.cpp:43: undefined reference to `C2D_DrawRectangle'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld.exe: C:/Users/<usrnme>/Desktop/ShinMegamiGinsei/source/main.cpp:61: undefined reference to `C2D_Fini'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitARM/3ds_rules:42: /home/<usrnme>/Desktop/ShinMegamiGinsei/ShinMegamiGinsei.elf] Error 1
make: *** [Makefile:165: all] Error 2