switchbrew / switch-examples

Switch examples for devkitA64 and libnx.

Home Page:https://devkitpro.org/viewforum.php?f=42

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[compile] opusfile.c undefined reference

TealSwiftfox opened this issue · comments

When I try to compile an application in SDL2 I got the following errors:

c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libopusfile.a(opusfile.o): in function op_get_packet_duration:
opusfile.c:(.text.op_get_packet_duration+0x10): undefined reference to opus_packet_get_nb_frames
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: opusfile.c:(.text.op_get_packet_duration+0x24): undefined reference to opus_packet_get_samples_per_frame
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libopusfile.a(opusfile.o): in function `op_clear:
opusfile.c:(.text.op_clear+0x24): undefined reference to opus_multistream_decoder_destroy
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libopusfile.a(opusfile.o): in function op_decode:
opusfile.c:(.text.op_decode+0x90): undefined reference to opus_multistream_decode
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libopusfile.a(opusfile.o): in function op_update_gain.part.7:
opusfile.c:(.text.op_update_gain.part.7+0x70): undefined reference to opus_multistream_decoder_ctl
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/portlibs/switch/lib\libopusfile.a(opusfile.o): in function op_make_decode_ready.part.8:
opusfile.c:(.text.op_make_decode_ready.part.8+0x60): undefined reference to opus_multistream_decoder_destroy
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: opusfile.c:(.text.op_make_decode_ready.part.8+0x7c): undefined reference to opus_multistream_decoder_create
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.1.0/../../../../aarch64-none-elf/bin/ld.exe: opusfile.c:(.text.op_make_decode_ready.part.8+0x10c): undefined reference to opus_multistream_decoder_ctl
collect2.exe: error: ld returned 1 exit status.

switch-portlibs switch-libopus and switch-opusfile

In the makefile I have this:

LIBS	:=	-lSDL2_image -lSDL2_mixer -lSDL2 \
			-lpng -lz -ljpeg -lwebp \
			-lvorbisidec -logg -lmpg123 -lmodplug -lopus -lopusfile \
			-lfreetype -lbz2 -lEGL -lglapi -ldrm_nouveau -lnx -lm

Environment: Windows 10 Pro 21H2 - devkitPro - libnx