gpt4 book ai didi

c - 运行 libspotify 示例

转载 作者:太空宇宙 更新时间:2023-11-04 02:04:52 25 4
gpt4 key购买 nike

我正在尝试运行 spotify 示例。我已经成功地编译了它们,但我无法运行任何东西。当即执行 ./jukebox.o 时,它只是说“无法执行二进制文件”。如何运行示例?

这是我做的时候得到的:

libspotify/examples$ 使 LIBSPOTIFY_PATH=../../../..对于自动点唱机 spshell 本地文件中的一个;做 -C $a LIBSPOTIFY_PATH="/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release"全部;完毕make[1]: 进入目录 /home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/share/doc/libspotify/examples/jukebox'
cc -I/usr/include/alsa -I/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/include -Wall -Wl,-rpath,/home/alexander/slask/libspotify-12.1。 51-Linux-x86_64-release/lib -L/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/lib jukebox.o appkey.o alsa-audio.o audio.o -o jukebox -lasound -lspotify
/usr/bin/ld: alsa-audio.o: 未定义对符号 'pthread_create@@GLIBC_2.2.5' 的引用
/lib/x86_64-linux-gnu/libpthread.so.0: 添加符号时出错:命令行中缺少 DSO
collect2:错误:ld 返回 1 退出状态
make[1]: *** [自动点唱机] 错误 1
make[1]: 离开目录
/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/share/doc/libspotify/examples/jukebox'make[1]: 进入目录 /home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/share/doc/libspotify/examples/spshell'
cc -I/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/include -Wall -Wl,-rpath,/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/lib -L/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/lib spshell.o spshell_posix.o appkey.o cmd.o browse.o search.o toplist.o inbox.o star.o playlist.o test.o -lreadline -lspotify -o spshell
/usr/bin/ld: spshell_posix.o: 未定义对符号 'pthread_create@@GLIBC_2.2.5' 的引用
/lib/x86_64-linux-gnu/libpthread.so.0: 添加符号时出错:命令行中缺少 DSO
collect2:错误:ld 返回 1 退出状态
make[1]: *** [spshell] 错误 1
make[1]: 离开目录
/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/share/doc/libspotify/examples/spshell'make[1]: 进入目录 /home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/share/doc/libspotify/examples/localfiles'
make[1]: 离开目录
/home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release/share/doc/libspotify/examples/localfiles'

最佳答案

我在 64 位 Ubuntu 上遇到了类似的问题。将 examples/common.mk 中的 LDLIBS 行编辑为如下内容

LDLIBS  += -lspotify -lpthread -ldl

关于c - 运行 libspotify 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22026249/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com