View previous topic :: View next topic |
Author |
Message |
feiutm9898
Joined: 01 Jun 2004 Posts: 3
|
tcp/ip lean: miniature web server |
Posted: Tue Jun 01, 2004 11:23 am |
|
|
Hi.
I have problem to compile source code come with tcp/ip lean books.
I use pcm version 3.187 .
I fail to compile the source code for tcplean/pcm/picweb.c at CDROM
This source code is the first version of TCP/IP Lean for SLIP communication. Not "CHIPWEB" version.
The error is "invalid type conversion" at the variable
Do you try it? And can provide updated source code for me.
please help me!
the error at red color line
.
.
.
if (match_byte(0x45) && skip_byte() && // Version, service
get_word(iplen) && skip_word() && // Len, ID
skip_word() && skip_byte() && // Frags, TTL
get_byte(ipcol) && skip_word() && // Protocol, checksum
get_lword(remote.l) && get_lword(local.l) &&// Addresses
checkhi==0xff && checklo==0xff)
.
.
.
Last edited by feiutm9898 on Tue Jun 01, 2004 10:52 pm; edited 1 time in total |
|
|
Chas Guest
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 01, 2004 12:36 pm |
|
|
A similar problem was discussed on the Microchip forum.
One person, alesan, said he fixed the problem, though
he didn't say how. You could email him for the answer
if you join the Microchip forum.
http://forum.microchip.com/tm.asp?m=30649#35964 |
|
|
PedroMoreira Guest
|
|
Posted: Sun Mar 06, 2005 12:53 pm |
|
|
I have the same problem...
anyone here can explain me how to fix this problem!!!!!????? |
|
|
Guest
|
|
Posted: Sun Mar 06, 2005 10:52 pm |
|
|
The problem is the definition of data type LWORD for very old CCS version.
try ... get_lword(&remote.l) && get_lword(&local.l)
or ... get_lword(&remote) && get_lword( &local )
the argument of function get_lword() should be a pointer,
i.e. the ADDRESS of the variable
check p16_drv.h and p16_web.c, you will see ...
BOOL get_lword(LWORD &lw);
typedef union // Longword definition (not a native type)
{
BYTE b[4];
WORD w[2];
BYTE l;
} LWORD;
Best wishes |
|
|
|