To do it edit your MakefileHave you actually linked the SDL2 library in your make file?
Where's tinfoil thoReleased 0.2.1, which fixes compatibility with the latest SDL2.
(had to do this to implement it on Tinfoil)
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libSDL2_mixer.a(music_opus.o): in function `OPUS_Load':
music_opus.c:(.text.OPUS_Load+0x10): undefined reference to `op_open_callbacks'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x14): undefined reference to `op_free'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x18): undefined reference to `op_head'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x1c): undefined reference to `op_seekable'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x20): undefined reference to `op_open_callbacks'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x24): undefined reference to `op_read'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x28): undefined reference to `op_pcm_seek'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x2c): undefined reference to `op_free'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x30): undefined reference to `op_head'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x34): undefined reference to `op_seekable'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x3c): undefined reference to `op_read'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x44): undefined reference to `op_pcm_seek'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /opt/devkitpro/Repos/Plutonium/Examples/Dialogs/Dialogs.elf] Error 1
make: *** [Makefile:156: Build] Error 2
can anyone help.. i can't make any exmaple it always shows these errors
Code:c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libSDL2_mixer.a(music_opus.o): in function `OPUS_Load': music_opus.c:(.text.OPUS_Load+0x10): undefined reference to `op_open_callbacks' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x14): undefined reference to `op_free' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x18): undefined reference to `op_head' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x1c): undefined reference to `op_seekable' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x20): undefined reference to `op_open_callbacks' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x24): undefined reference to `op_read' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x28): undefined reference to `op_pcm_seek' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x2c): undefined reference to `op_free' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x30): undefined reference to `op_head' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x34): undefined reference to `op_seekable' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x3c): undefined reference to `op_read' c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x44): undefined reference to `op_pcm_seek' collect2.exe: error: ld returned 1 exit status make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /opt/devkitpro/Repos/Plutonium/Examples/Dialogs/Dialogs.elf] Error 1 make: *** [Makefile:156: Build] Error 2
If you are on absolute latest DKP, I cant help you since it has problems. If you are an older, DKP try this in the makefile:
-lSDL2_mixer -lmodplug -lmpg123 -lvorbisidec -logg
how to downgarde to optimal working one that i can just type make and get the nro without any error
--------------------- MERGED ---------------------------
LIBS := -lpu -lfreetype -lSDL2_mixer -lmodplug -lmpg123 -lvorbisidec -logg -lSDL2_ttf -lSDL2_gfx -lSDL2_image -lSDL2 -lEGL -lGLESv2 -lglapi -ldrm_nouveau -lwebp -lpng -ljpeg `sdl2-config --libs` `freetype-config --libs` -lnx
LIBS := -lSDL2_mixer -lmodplug -lmpg123 -lvorbisidec -logg
this is the stock LIBS in the examples MAKE file
Code:LIBS := -lpu -lfreetype -lSDL2_mixer -lmodplug -lmpg123 -lvorbisidec -logg -lSDL2_ttf -lSDL2_gfx -lSDL2_image -lSDL2 -lEGL -lGLESv2 -lglapi -ldrm_nouveau -lwebp -lpng -ljpeg `sdl2-config --libs` `freetype-config --libs` -lnx
should i replace it with
Code:LIBS := -lSDL2_mixer -lmodplug -lmpg123 -lvorbisidec -logg
so should i give up now or what???No, do not replace it. You are 100% encountering an issue with new DKP's bullshit. I cannot help you, as I stay away from that dumpster fire.
so should i give up now or what???
i wanna use the templates for my app using this lib
how to download all the libs to remove this headacheIt is just a linker error, you need to find the library that it wants.
how to download all the libs to remove this headache
also try adding -lopusfiletry adding -lopus to your libs string
C:\devkitPro\Repos\Plutonium\Examples\SimpleApplication>make
MainApplication.main.cpp
aarch64-none-elf-g++ -MMD -MP -MF /opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Build/MainApplication.main.d -g -O2 -fpermissive -ffunction-sections -w -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -I/opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Include -I/opt/devkitpro/portlibs/switch/include -I/opt/devkitpro/libnx/include -I/opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/../../Plutonium/Output/include -I/opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Build -D__SWITCH__ -fexceptions -std=gnu++17 -c /opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Source/MainApplication.main.cpp -o MainApplication.main.o
MainApplication.cpp
aarch64-none-elf-g++ -MMD -MP -MF /opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Build/MainApplication.d -g -O2 -fpermissive -ffunction-sections -w -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -I/opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Include -I/opt/devkitpro/portlibs/switch/include -I/opt/devkitpro/libnx/include -I/opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/../../Plutonium/Output/include -I/opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Build -D__SWITCH__ -fexceptions -std=gnu++17 -c /opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/Source/MainApplication.cpp -o MainApplication.o
linking SimpleApplication.elf
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libSDL2_mixer.a(music_opus.o): in function `OPUS_Load':
music_opus.c:(.text.OPUS_Load+0x10): undefined reference to `op_open_callbacks'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x14): undefined reference to `op_free'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x18): undefined reference to `op_head'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x1c): undefined reference to `op_seekable'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x20): undefined reference to `op_open_callbacks'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x24): undefined reference to `op_read'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x28): undefined reference to `op_pcm_seek'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x2c): undefined reference to `op_free'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x30): undefined reference to `op_head'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x34): undefined reference to `op_seekable'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x3c): undefined reference to `op_read'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: music_opus.c:(.text.OPUS_Load+0x44): undefined reference to `op_pcm_seek'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /opt/devkitpro/Repos/Plutonium/Examples/SimpleApplication/SimpleApplication.elf] Error 1
make: *** [Makefile:156: Build] Error 2
try adding -lopus to your libs string
also try adding -lopusfile