By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,934 Members | 1,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,934 IT Pros & Developers. It's quick & easy.

What does this error mean?

P: n/a
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?
Nov 13 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a

"Zero" <sb********@yahoo.com> wrote in message
news:73**************************@posting.google.c om...
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?


It looks as though the error may be elsewhere, try posting a bit more of
your code
Allan
Nov 13 '05 #2

P: n/a
In article <73**************************@posting.google.com >, Zero wrote:
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?

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)
Nov 13 '05 #3

P: n/a
sb********@yahoo.com (Zero) wrote:
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);


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
Nov 13 '05 #4

P: n/a
In <73**************************@posting.google.com > sb********@yahoo.com (Zero) writes:
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?


Most likely, because you're trying to compile a standard C program with
a K&R C compiler.

Read cc's man page to see if it can be invoked in standard C mode or use
gcc to compile the code.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #5

P: n/a
On Wed, 24 Sep 2003, Zero wrote:
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
In member.c on line 3 is the statement #include "packet.h". In the file
packet.h the compiler encountered a problem on OR BEFORE line 55. It
thinks the problem is two or more data types in declaration of
'construct_request' are invalid.

The key things to remember are that the problem could have occurred on
line 1 or 2 of member.c or on lines 1 through 55 of packet.h.
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?


I see nothing wrong with this line. Must be before line 55. First thinkg
I'd check for is a missing semicolon on line 54.

--
darrell at cs dot toronto dot edu
or
main(){int j=1234;char t[]=":@abcdefghijklmnopqrstuvwxyz.\n",*i=
"iqgbgxmdbjlgdv.lksrqek.n";char *strchr(const char *,int);while(
*i){j+=strchr(t,*i++)-t;j%=sizeof t-1;putchar(t[j]);} return 0;}
Nov 13 '05 #6

P: n/a
On Wed, 24 Sep 2003, Zero wrote:
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
In member.c on line 3 is the statement #include "packet.h". In the file
packet.h the compiler encountered a problem on OR BEFORE line 55. It
thinks the problem is two or more data types in declaration of
'construct_request' are invalid.

The key things to remember are that the problem could have occurred on
line 1 or 2 of member.c or on lines 1 through 55 of packet.h.
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?


I see nothing wrong with this line. Must be before line 55. First thinkg
I'd check for is a missing semicolon on line 54.

--
darrell at cs dot toronto dot edu
or
main(){int j=1234;char t[]=":@abcdefghijklmnopqrstuvwxyz.\n",*i=
"iqgbgxmdbjlgdv.lksrqek.n";char *strchr(const char *,int);while(
*i){j+=strchr(t,*i++)-t;j%=sizeof t-1;putchar(t[j]);} return 0;}
Nov 13 '05 #7

P: n/a
sb********@yahoo.com (Zero) writes:
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


I would check the code just before this, to make sure that the
previous declaration was properly terminated with a ; or }.
--
"This is a wonderful answer.
It's off-topic, it's incorrect, and it doesn't answer the question."
--Richard Heathfield
Nov 13 '05 #8

P: n/a
sb********@yahoo.com (Zero) writes:
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


I would check the code just before this, to make sure that the
previous declaration was properly terminated with a ; or }.
--
"This is a wonderful answer.
It's off-topic, it's incorrect, and it doesn't answer the question."
--Richard Heathfield
Nov 13 '05 #9

P: n/a
Thanks for your replies.

It turned out that I for got a semi-colon on the line above.

Oooppps!

sb********@yahoo.com (Zero) wrote in message news:<73**************************@posting.google. com>...
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?

Nov 13 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.