633 linux code won't compile...

craiger316

New member
Hi there I downloaded 633-linux-port.tar.gz but cannot get it to compile.

Basically I am running Red Hat Linux release 7.1 and when I ungzip/untar the example and run the associated make script, I get the following errors:

[craiger@becky linux-port]$ ./make
633_packet.c: In function `check_for_packet':
633_packet.c:96: parse error before `i'
633_packet.c:126: `i' undeclared (first use in this function)
633_packet.c:126: (Each undeclared identifier is reported only once
633_packet.c:126: for each function it appears in.)
show_packet.c: In function `ShowReceivedPacket':
show_packet.c:100: parse error before `char'
show_packet.c:102: `expanded' undeclared (first use in this function)
show_packet.c:102: (Each undeclared identifier is reported only once
show_packet.c:102: for each function it appears in.)
test633.c: In function `main':
test633.c:31: parse error before `char'
test633.c:33: `line1' undeclared (first use in this function)
test633.c:33: (Each undeclared identifier is reported only once
test633.c:33: for each function it appears in.)
test633.c:38: parse error before `char'
test633.c:40: `line2' undeclared (first use in this function)
gcc: test633.o: No such file or directory
gcc: 633_packet.o: No such file or directory
gcc: show_packet.o: No such file or directory

It's weird, the code looks fine to me....

Any ideas?

Craig.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
Last edited:

craiger316

New member
My friend compiled it for me with gcc 3.0 and it worked except that it could not find errorno.h, we just commented the include out and it compiled. Where is this errorno.h file?

I was using gcc 2.96 and was getting those errors from my first post...

Craig.
 
Last edited:

CF Mark

Administrator
I made the port from the windows code under:
Linux-From-Scratch CVS 20020604
GCC 3.1
Kernel 2.4.6

errorno.h is part of the kernel, so i gather you must be using a 2.2.xx kernel?

It seems your version of gcc is sticking to straight "c" code rules in not letting variable definitions occour after real code.
You might want to try compiling it with the C++ of GCC.
 

craiger316

New member
Ok, basically I changed the make file to use g++ instead of gcc. Althougth I could have sworn that gcc would just figure out what to use based on syntax hints. My friend compiled it under gcc 3.x and it compiled fine, I guess there is a big difference between 2.9x and 3.x.

g++ made me manually include ctype.h and string.h to the source files that used functions from those two libraries. I guess gcc 3.x is smart enough to link those headers in automagically.

Thanks,

Craig.
 
Top