473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

What does this error mean?

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
9 7673

"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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
6
by: WindAndWaves | last post by:
Hi Folks I have inhereted a script that I understand reasonably well, I just do not understand !/^\d+$/.test(el.value) what the hell does that mean? Below is the script (there are really...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
13
by: Protoman | last post by:
I'm getting an error: 10 C:\Dev-Cpp\Enigma.cpp no match for 'operator<' in 'i < (+cleartext)->std::basic_string<_CharT, _Traits, _Alloc>::end ()' Code: Enigma.hpp...
5
by: prabu | last post by:
Hi all, I want to know, what does the value of the array in the following statement mean and How to print the content of the array SMB_Negotiate using printf? unsigned char SMB_Negotiate = ...
6
by: Bint | last post by:
I'm getting this returned from a PHP script. What does this mean? <b>Parse error</b>: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in <b>/ho Thanks B
2
by: Lambda | last post by:
The code is simple: // Token.h #ifndef TOKEN_H #define TOKEN_H #include <vector> #include <string> class Token
5
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.