我正在嘗試運行spotify示例。我已經完全編譯了它們,但是我什麼都不能運行。當做./jukebox.o它只是說「不能執行二進制文件」。我如何運行這些示例?運行libspotify示例
這是我得到時,我的確讓:
libspotify /例子$使LIBSPOTIFY_PATH = ../../../.. 了在點唱機spshell localfiles;做成-C $ a LIBSPOTIFY_PATH =「/ home/alexander/slask/libspotify-12.1.51-Linux-x86_64-release」all;完成 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: undefined reference to symbol '[email protected]@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [jukebox] Error 1 make[1]: Leaving directory
/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: undefined reference to symbol '[email protected]@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [spshell] Error 1 make[1]: Leaving directory
/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]: Leaving directory
/home/alexander/slask/libspotify-12.1.51-Linux -x86_64-release/share/doc/libspotify/examples/localfiles'
您正在使用什麼操作系統,以及您如何構建示例? 「jukebox.o」聽起來像一個目標文件,而不是一個可執行文件,所以你可能已經編譯了它,但沒有鏈接它。 – Weeble
我使用Makefile編譯它。運行Ubuntu 64bit。 – AlexanderNajafi