[uClinux-dev] Question about uCSimm/uCLinux manual

VGTalkPR at aol.com VGTalkPR at aol.com
Mon Nov 12 21:04:33 EST 2001


On page 84 (Section 5.4) of the uCLinux/uCSimm manual from Lineo, there is an 
example of how to write a server app
using select. I typed it word for word, but when I try to compile it with
the m68k-pic-coff-gcc compiler, I get the following error message:

[nktran at localhost otl]$ m68k-pic-coff-gcc -O2 otl_server.c -o
otl_embedded_serv er
otl_server.c: In function `main':
otl_server.c:53: `FD_SETSIZE' undeclared (first use this function)
otl_server.c:53: (Each undeclared identifier is reported only once
otl_server.c:53: for each function it appears in.)
otl_server.c:84: warning: passing arg 2 of `read' from incompatible
pointer type
otl_server.c:88: warning: passing arg 2 of `write' from incompatible
pointer type


When I defined FD_SETSIZE to an arbitrary number, I get the following:

[nktran at localhost otl]$ m68k-pic-coff-gcc -O2 otl_server.c -o
otl_embedded_server
otl_server.c: In function `main':
otl_server.c:84: warning: passing arg 2 of `read' from incompatible
pointer type
otl_server.c:88: warning: passing arg 2 of `write' from incompatible
pointer type
/tmp/cc30EkYs1.o(.text+0x132):otl_server.c: undefined reference to
`FD_ZERO'
/tmp/cc30EkYs1.o(.text+0x132):otl_server.c: relocation truncated to fit:
DISP16 FD_ZERO
/tmp/cc30EkYs1.o(.text+0x13a):otl_server.c: undefined reference to
`FD_SET'
/tmp/cc30EkYs1.o(.text+0x13a):otl_server.c: relocation truncated to fit:
DISP16 FD_SET
/tmp/cc30EkYs1.o(.text+0x196):otl_server.c: undefined reference to
`FD_ISSET'
/tmp/cc30EkYs1.o(.text+0x196):otl_server.c: relocation truncated to fit:
DISP16 FD_ISSET
/tmp/cc30EkYs1.o(.text+0x1c2):otl_server.c: undefined reference to
`FD_SET'
/tmp/cc30EkYs1.o(.text+0x1c2):otl_server.c: relocation truncated to fit:
DISP16 FD_SET
/tmp/cc30EkYs1.o(.text+0x1fe):otl_server.c: undefined reference to
`FD_CLR'
/tmp/cc30EkYs1.o(.text+0x1fe):otl_server.c: relocation truncated to fit:
DISP16 FD_CLR
mv: otl_embedded_server: No such file or directory
Can't open otl_embedded_server.coff

Did I forget something to add something? 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20011112/4b78d3ed/attachment.html>


More information about the uClinux-dev mailing list