这个错误是什么意思? [英] What does this error mean?

查看:235
本文介绍了这个错误是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

cc -c -o member.o member.c

在member.c中包含的文件中:3:

packet.h:55:两个或更多数据`construct_request''声明中的类型

packet.h:55:对于'construct_request'的长,短,有符号或无符号无效'

make:*** [成员.o]错误1

这是packet.h中的第55行:


unsigned char * construct_request(unsigned char * packet);


编译程序时为什么会出现此错误?

cc -c -o member.o member.c
In file included from member.c:3:
packet.h:55: two or more data types in declaration of `construct_request''
packet.h:55: long, short, signed or unsigned invalid for `construct_request''
make: *** [member.o] Error 1
Here is what line 55 in packet.h is:

unsigned char *construct_request(unsigned char *packet);

Why do I get this error when compiling the program?

推荐答案



" ;零" < SB ******** @ yahoo.com>在消息中写道

news:73 ************************** @ posting.google.c om ...

"Zero" <sb********@yahoo.com> wrote in message
news:73**************************@posting.google.c om...
cc -c -o member.o member.c
在member.c中包含的文件中:3:
packet.h:55:声明中有两种或更多数据类型ofconstruct_request'
packet.h:55:long,short,signed或unsigned null
` construct_request''make:*** [member.o]错误1

以下是packet.h中的第55行:

unsigned char * construct_request(unsigned char * packet);

为什么编译程序时会出现此错误?
cc -c -o member.o member.c
In file included from member.c:3:
packet.h:55: two or more data types in declaration of `construct_request''
packet.h:55: long, short, signed or unsigned invalid for `construct_request'' make: *** [member.o] Error 1
Here is what line 55 in packet.h is:

unsigned char *construct_request(unsigned char *packet);

Why do I get this error when compiling the program?




看起来好像错误可能在其他地方,尝试发布更多的

您的代码

Allan



It looks as though the error may be elsewhere, try posting a bit more of
your code
Allan


文章< 73 ************************** @发布.google.com>,Zero写道:
In article <73**************************@posting.google.com >, Zero wrote:
cc -c -o member.o member.c
在member.c中包含的文件:3:
packet.h :55:声明`c中的两个或更多数据类型onstruct_request''
packet.h:55:`construct_request'的长,短,有符号或无符号无效'
make:*** [member.o]错误1

以下是packet.h中的第55行:

unsigned char * construct_request(unsigned char * packet);

为什么在编译程序时会出现此错误?
cc -c -o member.o member.c
In file included from member.c:3:
packet.h:55: two or more data types in declaration of `construct_request''
packet.h:55: long, short, signed or unsigned invalid for `construct_request''
make: *** [member.o] Error 1
Here is what line 55 in packet.h is:

unsigned char *construct_request(unsigned char *packet);

Why do I get this error when compiling the program?



看起来很可疑,好像你的编译器不支持unsigned char。我有点b $ b不知道什么样的编译器不会那样,但是..


想到的另一个想法是你的编译器可能不喜欢你写原型的方式

- 也就是说它可能不喜欢数据包。并错误地将b $ b兑换成其他东西(即它可能需要K& R风格的原型)。


无论如何,我没有看到任何实际问题这一行..我想在这里没有宏

这个名字吗? (construct_request和数据包不是宏)?


奇怪的是盯着我..;)


rlc

-

监狱:只是另一种解释语言

只是:监狱使用愚蠢的条款


加入关于定义的讨论这种语言在
ja***********@lists.sourceforge .net http://jail-ust.sourceforge.net

(发送邮件至 ja * ********************@lists.sourceforge.net


It look suspiciously as if your compiler doesn''t support unsigned char. I have
no idea as to what kind of compiler wouldn''t like that, though..

Another idea that comes to mind is that your compiler might not like the way
you wrote your prototype - i.e. it might not like "packet" and mistakenly
croak on something else (i.e. it might want K&R style prototypes).

Anyways, I don''t see any actual problem on this one line.. there''s no macro
name here anywhere, I suppose? (construct_request and packet are not macros)?

oddness is staring at me.. ;)

rlc
--
Jail: Just Another Interpreted Language
Just: Jail Uses Silly Terms

Join the discussion on the definition of this language at
ja***********@lists.sourceforge.net http://jail-ust.sourceforge.net
(send mail to ja*********************@lists.sourceforge.net)


sb ******** @ yahoo.com (零)写道:
sb********@yahoo.com (Zero) wrote:
packet.h:55:'construct_request''声明中的两个或多个数据类型
packet.h:55:对于`construct_request'的长,短,有符号或无符号无效'
这是什么packet.h中的第55行是:

unsigned char * construct_request(unsigned char * packet);
packet.h:55: two or more data types in declaration of `construct_request''
packet.h:55: long, short, signed or unsigned invalid for `construct_request'' Here is what line 55 in packet.h is:

unsigned char *construct_request(unsigned char *packet);




疯狂的猜测时间,因为你没有显示足够的代码驯服的猜测。


您可能将#defined或typedef'ded construct_request作为一种类型。对于

的例子,你可以做到这一点


#define construct_request int





typedef int construct_request;


在您的代码中较早。


如果没有,请发布更多代码。


Richard



Wild guess time, since you haven''t shown enough code for a tame guess.

You may have #defined or typedef''d construct_request to be a type. For
example, you could have done

#define construct_request int

or

typedef int construct_request;

earlier in your code.

If not, post more code.

Richard


这篇关于这个错误是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆