Как выяснить неопределенные ссылки на Mix_MusicInterface_MPG123? - PullRequest
0 голосов
/ 11 июня 2019

Я пытаюсь настроить и создать библиотеку sdl mixer, но я получаю сообщение об ошибке

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 во время выполнения.

вывод команды $ .. / config в файле сборки в моей библиотеке SDL2_mixer-2.0.4. Показывая это, вы можете видеть, что эти 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. Но я никогда не делал этого раньше, и я знаю, что часто есть нечто большее, чем кажется на первый взгляд. Поэтому, пожалуйста, просветите меня.

1 Ответ

0 голосов
/ 12 июня 2019

Хорошо, в моем файле сборки sdl mixer есть еще один файл сборки с копией всего, что заняло у меня много времени, чтобы понять, что, скорее всего, я что-то сделал, не заметив этого. Это, казалось, было проблемой, удалило это, и это построило.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...