LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 912|回复: 7

我在编译mp3blaster-3.1.3时候出错,求救!

[复制链接]
发表于 2003-11-19 09:07:35 | 显示全部楼层 |阅读模式
出错信息:
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../mpegsound -I/usr/include/ncurses
-I../nmixer -I/usr/include    -O2 -Wall -Wstrict-prototypes -W
-fno-strength-reduce   -DMP3BLASTER_DOCDIR=\"/usr/share/mp3blaster\" -c
main.cc
main.cc:135:54: macro "gettext" passed 2 arguments, but takes just 1
main.cc:135: error: `char*gettext' redeclared as different kind of
symbol
/usr/include/libintl.h:40: error: previous declaration of `char*
gettext(const
   char*)'
我查找了一下文件,发现只有这些文件中包括gettext的申明:
./getopt.c: # define _(msgid)    gettext (msgid)
../main.cc:char *gettext(const char *label, short display_path=0);
./main.cc:              name = gettext("Enter filename:", 1);
./main.cc:      name = gettext("Enter filename", 1);

而在冲突的库文件libintl.h中gettext的定义:

/usr/include/libintl.h
/* Look up MSGID in the current default message catalog for the current
   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
   text).  */
extern char *gettext (__const char *__msgid) __THROW;

自己尝试了,但是无法解决,恳请高手帮忙看看。
发表于 2003-11-19 12:17:01 | 显示全部楼层
try to use gettext-0.11.5
发表于 2003-11-19 12:23:17 | 显示全部楼层
我从debian里找了一个mp3blaster的补丁,可以用.
packages.debian.org
发表于 2003-11-19 16:02:01 | 显示全部楼层
很奇怪的问题。跟gcc版本有关。3.3.1和2.95.3都不能顺利编译,只有3.2可以。估计作者就用的3.2
看来要保留3个版本的gcc了
发表于 2003-11-19 16:34:01 | 显示全部楼层
gettext的版本问题
我这里gcc 3.3.1正确编译
发表于 2003-11-19 17:27:30 | 显示全部楼层
明白了
 楼主| 发表于 2003-11-21 17:12:46 | 显示全部楼层
我把gettext-0.11-5装好之后编译,仍然出错。

我把main.cc中的
char *gettext(const char *label, short display_path=0);
这个宏注释掉之后,编译就成功了
我也不明所以然了
发表于 2003-11-21 17:20:33 | 显示全部楼层
char *gettext(const char *label, short display_path=0)

参数问题。。。

usr/include/libintl.h

gettext(const
char*)'
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表