自己写 的一个音乐播放器

由本社区发起的开源项目
回复
watermanbai
帖子: 3
注册时间: 2008-10-06 23:21

安装失败

#31

帖子 watermanbai » 2009-02-18 23:14

没有gdbm.h这个头文件
正在设置 libxine1-all-plugins (1.1.15-0ubuntu3.1intrepid1) ...
gcc main.c -g -c -Wall -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
gcc window.c -g -c -Wall -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
gcc play.c -g -c -Wall -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
play.c:4:17: error: gdbm.h: 没有该文件或目录
make: *** [play.o] 错误 1
mv: 无法 stat “musicplayer”: 没有该文件或目录
运行"musicplayer"启动程序
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 安装失败

#32

帖子 windwhinny » 2009-02-18 23:30

watermanbai 写了:没有gdbm.h这个头文件
正在设置 libxine1-all-plugins (1.1.15-0ubuntu3.1intrepid1) ...
gcc main.c -g -c -Wall -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
gcc window.c -g -c -Wall -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
gcc play.c -g -c -Wall -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
play.c:4:17: error: gdbm.h: 没有该文件或目录
make: *** [play.o] 错误 1
mv: 无法 stat “musicplayer”: 没有该文件或目录
运行"musicplayer"启动程序
我已经去掉gdm库了.
请下载新的代码.
watermanbai
帖子: 3
注册时间: 2008-10-06 23:21

Re: 自己写 的一个音乐播放器(每日多次更新)

#33

帖子 watermanbai » 2009-02-19 13:16

我刚重新下载,重新安装,还是那个错误。
头像
friend.ethan
帖子: 687
注册时间: 2008-05-13 20:40
来自: 江南西道

Re: 自己写 的一个音乐播放器(每日多次更新)

#34

帖子 friend.ethan » 2009-02-19 13:23

楼主,你的精神可嘉,你的技术可赞~
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器(每日多次更新)

#35

帖子 windwhinny » 2009-02-19 14:10

watermanbai 写了:我刚重新下载,重新安装,还是那个错误。
不好意思....犯了一个低级错误....你把play.c开始有一行#include"gdbm.h"删掉就行了
watermanbai
帖子: 3
注册时间: 2008-10-06 23:21

Re: 自己写 的一个音乐播放器(每日多次更新)

#36

帖子 watermanbai » 2009-02-19 21:49

安装成功,楼主继续加油啊
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器(每日多次更新)

#37

帖子 windwhinny » 2009-02-20 0:08

watermanbai 写了:安装成功,楼主继续加油啊
终于有人说安装上了...老衲很是感动....
iotioa
帖子: 5
注册时间: 2009-02-20 12:25

Re: 自己写 的一个音乐播放器

#38

帖子 iotioa » 2009-02-20 13:36

追疯少年 写了:
windwhinny 写了:
追疯少年 写了:怎么安装呢?
在源代码目录输入"make",然后"./project"就可以运行拉
make的时候就出错了 :em20 :em20

代码: 全选

root@jia-laptop:~# cd /root/桌面/player
root@jia-laptop:~/桌面/player# make
gcc main.c -g -c `pkg-config --cflags gtk+-2.0`
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
main.c:1:20: 错误: gtk/gtk.h:没有该文件或目录
在包含自 main.c:3 的文件中:
eggtrayicon.h:24:25: 错误: gtk/gtkplug.h:没有该文件或目录
eggtrayicon.h:25:22: 错误: gdk/gdkx.h:没有该文件或目录
In file included from main.c:3:
eggtrayicon.h:36: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
eggtrayicon.h:41: 错误: expected specifier-qualifier-list before ‘GtkPlug’
eggtrayicon.h:56: 错误: expected specifier-qualifier-list before ‘GtkPlugClass’
eggtrayicon.h:59: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘egg_tray_icon_get_type’
eggtrayicon.h:61: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
eggtrayicon.h:63: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘egg_tray_icon_get_orientation’
In file included from /usr/include/stdlib.h:33,
                 from main.c:4:
/usr/lib/gcc/i486-linux-gnu/4.2.4/include/stddef.h:326: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
In file included from main.c:4:
/usr/include/stdlib.h:782: 错误: expected ‘)’ before ‘*’ token
/usr/include/stdlib.h:786: 错误: expected declaration specifiers or ‘...’ before ‘wchar_t’
/usr/include/stdlib.h:790: 错误: expected ‘)’ before ‘*’ token
/usr/include/stdlib.h:794: 错误: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
main.c:6:17: 错误: xine.h:没有该文件或目录
In file included from main.c:7:
main.h:4: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.h:5: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.h:7: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.h:10: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from main.c:8:
play.h:10: 错误: expected ‘)’ before ‘*’ token
play.h:12: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
play.h:13: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
play.h:14: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
play.h:15: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from main.c:9:
picture.h:7: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘picture’
In file included from main.c:10:
window.h:4: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
window.h:16: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
window.h:18: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
window.h:22: 错误: ‘PATH_MAX’未声明 (不在函数内)
window.h:26: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from main.c:11:
player_icon.h:7: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘player_icon’
main.c: 在函数‘quit’中:
main.c:24: 错误: ‘stream’未声明 (在此函数内第一次使用)
main.c:24: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
main.c:24: 错误: 所在的函数内也只报告一次。)
main.c:37: 警告: 内建函数 ‘sprintf’ 不兼容的隐式声明
main.c:44: 警告: 从不兼容的指针类型赋值
main.c: 在函数‘window_show’中:
main.c:50: 错误: ‘window’未声明 (在此函数内第一次使用)
main.c: 在文件层:
main.c:52: 错误: expected ‘)’ before ‘*’ token
main.c: 在函数‘creat_menu’中:
main.c:60: 错误: ‘GtkMenuItem’未声明 (在此函数内第一次使用)
main.c:60: 错误: ‘item’未声明 (在此函数内第一次使用)
main.c:61: 错误: ‘menu’未声明 (在此函数内第一次使用)
main.c:67: 错误: ‘GTK_STOCK_MEDIA_PREVIOUS’未声明 (在此函数内第一次使用)
main.c:72: 错误: ‘item_pause’未声明 (在此函数内第一次使用)
main.c:72: 错误: ‘GTK_STOCK_MEDIA_PAUSE’未声明 (在此函数内第一次使用)
main.c:76: 错误: ‘item_play’未声明 (在此函数内第一次使用)
main.c:76: 错误: ‘GTK_STOCK_MEDIA_PLAY’未声明 (在此函数内第一次使用)
main.c:80: 错误: ‘GTK_STOCK_MEDIA_NEXT’未声明 (在此函数内第一次使用)
main.c:85: 错误: ‘GTK_STOCK_QUIT’未声明 (在此函数内第一次使用)
main.c: 在函数‘main’中:
main.c:92: 错误: ‘GtkWidget’未声明 (在此函数内第一次使用)
main.c:93: 错误: ‘image’未声明 (在此函数内第一次使用)
main.c:94: 错误: ‘eventbox’未声明 (在此函数内第一次使用)
main.c:95: 错误: ‘GdkPixbuf’未声明 (在此函数内第一次使用)
main.c:95: 错误: ‘tray_icon’未声明 (在此函数内第一次使用)
main.c:97: 错误: ‘icon’未声明 (在此函数内第一次使用)
main.c:98: 错误: ‘window_icon’未声明 (在此函数内第一次使用)
main.c:98: 错误: ‘player_icon’未声明 (在此函数内第一次使用)
main.c:98: 错误: ‘FALSE’未声明 (在此函数内第一次使用)
main.c:99: 错误: ‘picture’未声明 (在此函数内第一次使用)
main.c:104: 错误: ‘show_menu’未声明 (在此函数内第一次使用)
main.c:107: 错误: ‘tips’未声明 (在此函数内第一次使用)
main.c:111: 错误: ‘GtkFunction’未声明 (在此函数内第一次使用)
main.c:111: 错误: expected ‘)’ before ‘auto_play’
make: *** [main.o] 错误 1
root@jia-laptop:~/桌面/player# 
make 前先 sudo apt-get install libgtk2.0-dev libxine-dev libxine1-ffmpeg libxine1-all-plugins
头像
wyapples
帖子: 36
注册时间: 2008-07-09 17:05
来自: 北京
联系:

Re: 自己写 的一个音乐播放器(每日多次更新)

#39

帖子 wyapples » 2009-02-21 14:16

应该放杂志里介绍介绍!!!
头像
kissdb
帖子: 578
注册时间: 2008-03-28 10:18
来自: 淮安and徐州

Re: 自己写 的一个音乐播放器(每日多次更新)

#40

帖子 kissdb » 2009-02-21 14:34

我的怎么显示乱码啊
头像
kissdb
帖子: 578
注册时间: 2008-03-28 10:18
来自: 淮安and徐州

Re: 自己写 的一个音乐播放器(每日多次更新)

#41

帖子 kissdb » 2009-02-21 14:37

kissdb 写了:我的怎么显示乱码啊
不是乱码是问号“????”
附件
Screenshot-播放列表.png
今天下午和一群女的聊天,突然有人说我不是男人。
我火了,我说,你说我不是,我掏出来给你看。
女生都笑了,有一个最牛,说,你掏啊……
于是我就把身份证掏出来了。
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器(每日多次更新)

#42

帖子 windwhinny » 2009-02-21 15:42

kissdb 写了:
kissdb 写了:我的怎么显示乱码啊
不是乱码是问号“????”
提取标签的函数是我自己写的,目前只能支持mp3的id3v1,id3v2,id3v3这3种方式,wav,wma,flac,ogg格式的歌曲目前尚不支持.
请把你的wav文件发我邮箱里,我看看,谢谢反馈...
windwhinny@gmail.com
头像
kissdb
帖子: 578
注册时间: 2008-03-28 10:18
来自: 淮安and徐州

Re: 自己写 的一个音乐播放器(每日多次更新)

#43

帖子 kissdb » 2009-02-21 18:05

我的wav是下载的mp3自己转换的,太大了有35M呢
我问的是问号的问题啊,
今天下午和一群女的聊天,突然有人说我不是男人。
我火了,我说,你说我不是,我掏出来给你看。
女生都笑了,有一个最牛,说,你掏啊……
于是我就把身份证掏出来了。
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器(每日多次更新)

#44

帖子 windwhinny » 2009-02-21 18:55

kissdb 写了:我的wav是下载的mp3自己转换的,太大了有35M呢
我问的是问号的问题啊,
专辑名字叫linda的那个不是wav格式的?
把那个发我邮箱里把,我看看怎么回事.
大部分情况都是歌曲信息储存的方式不符合标准格式,比如realplayer都用自己的一套格式储存.所以导致读取错误
fexzi
帖子: 36
注册时间: 2009-01-09 12:50

Re: 自己写 的一个音乐播放器(每日多次更新)

#45

帖子 fexzi » 2009-02-21 19:05

自己写的啊,挺厉害的嘛
回复