如何清除对Mix_MusicInterface_MPG123的未定义引用



我正在尝试配置和制作 SDL 混音器库,但出现错误

build/.libs/libSDL2_mixer.so: undefined reference to `Mix_MusicInterface_MPG123'
build/.libs/libSDL2_mixer.so: undefined reference to `Mix_MusicInterface_Opus'
build/.libs/libSDL2_mixer.so: undefined reference to `Mix_MusicInterface_MODPLUG'

我相信这些库已安装. 但它们应该是动态链接的,这可能是我没有做对事情的原因。我相信 MPG123 处理.mp3文件格式,这解释了为什么我无法在运行时加载 mp3。

输出从 $..我的 SDL2_mixer-2.0.4 库中构建文件中的/config 命令。显示这一点,以便您可以看到这 3 个库可用且可用。

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for windres... no
checking for linux-gnu-windres... no
checking for an ANSI C-conforming const... yes
checking for GCC -MMD -MT option... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SDL... yes
checking for pow in -lm... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for setbuf... yes
checking for GCC -fvisibility=hidden option... yes
checking for fork... yes
checking for vfork... yes
checking for MODPLUG... yes
-- dynamic libmodplug -> libmodplug.so.1
checking fluidsynth.h usability... yes
checking fluidsynth.h presence... yes
checking for fluidsynth.h... yes
checking for fluid_player_add_mem in -lfluidsynth... yes
-- dynamic libfluidsynth -> libfluidsynth.so.1
checking vorbis/vorbisfile.h usability... yes
checking vorbis/vorbisfile.h presence... yes
checking for vorbis/vorbisfile.h... yes
checking for ov_open_callbacks in -lvorbisfile... yes
-- dynamic libvorbisfile -> libvorbisfile.so.3
checking FLAC/export.h usability... yes
checking FLAC/export.h presence... yes
checking for FLAC/export.h... yes
checking for libflac so-name version >= 8... yes
checking FLAC/stream_decoder.h usability... yes
checking FLAC/stream_decoder.h presence... yes
checking for FLAC/stream_decoder.h... yes
checking for FLAC__stream_decoder_new in -lFLAC... yes
-- dynamic libFLAC -> libFLAC.so.8
checking mpg123.h usability... yes
checking mpg123.h presence... yes
checking for mpg123.h... yes
checking for mpg123_replace_reader_handle in -lmpg123... yes
-- dynamic libmpg123 -> libmpg123.so.0
checking for OPUSFILE... yes
-- dynamic opusfile -> libopusfile.so.0
configure: creating ./config.status
config.status: executing libtool commands
configure: creating ./config.status
config.status: creating Makefile
config.status: creating SDL2_mixer.spec
config.status: creating SDL2_mixer.pc
config.status: executing libtool commands
config.status: executing default commands

我预计不会有错误消息,因为它通过了配置清单,而在此之前我没有安装它们,并且 modplug、mpg123 和 opus 的输出为"否"。 但我以前从未真正这样做过,我知道往往不止于此。所以请启发我。

好的,在我的 sdl mixer 构建文件中,还有另一个构建文件,其中包含 eveything 的副本,我花了很长时间才意识到这可能是我没有注意到的事情。这似乎是问题所在,删除它并构建。

相关内容

  • 没有找到相关文章

最新更新