Mail Archives: cygwin/2001/06/06/01:52:41
------=_NextPart_000_0007_01C0EE92.5958C680
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0008_01C0EE92.5958C680"
------=_NextPart_001_0008_01C0EE92.5958C680
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Dear ,
After I compiled , it gave me this msg.
zc.o(.text+0x159):zc.c: undefined reference to `compress'
collect2: ld returned 1 exit status
make: *** [zc] Error 1
=20
what happends to my code ? TQ for your attention
=20
=20
=20
best regards
kalmen
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.252 / Virus Database: 125 - Release Date: 09/05/2001
------=_NextPart_001_0008_01C0EE92.5958C680
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Dear ,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>After I compiled , it gave me this=20
msg.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>zc.o(.text+0x159):zc.c: undefined =
reference to=20
`compress'<BR>collect2: ld returned 1 exit status<BR>make: *** [zc] =
Error=20
1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>what happends to my code ? TQ for your=20
attention</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>best regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>kalmen</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><BR>---<BR>Outgoing mail is certified =
Virus=20
Free.<BR>Checked by AVG anti-virus system (<A=20
href=3D"http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: =
6.0.252 /=20
Virus Database: 125 - Release Date: =
09/05/2001</FONT></DIV></BODY></HTML>
------=_NextPart_001_0008_01C0EE92.5958C680--
------=_NextPart_000_0007_01C0EE92.5958C680
Content-Type: application/octet-stream;
name="zc.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="zc.c"
/*=0A=
* $Id: zc.c,v 1.1 2001/01/29 15:10:04 york Exp $=0A=
*=0A=
* This program is used to build Palm OS database containing Bible text.=0A=
* It compresses particular chapters using zlib compression library.=0A=
*=0A=
* To successfully build this program install zlib-devel-*.rpm package.=0A=
*/=0A=
=0A=
#include <stdio.h>=0A=
#include <zlib.h>=0A=
=0A=
#define BUF_SIZE (1024*64)=0A=
=0A=
int main(int argc, char **argv)=0A=
{=0A=
char src[BUF_SIZE], dst[BUF_SIZE];=0A=
unsigned long src_len, dst_len =3D sizeof(dst);=0A=
FILE *fd;=0A=
int res;=0A=
=0A=
// check input params=0A=
if(argc !=3D 3)=0A=
{=0A=
printf("%s source destination\n", argv[0]);=0A=
return 0;=0A=
}=0A=
=0A=
// read file into the memory=0A=
if((fd =3D fopen(argv[1], "rb")) !=3D NULL)=0A=
{=0A=
src_len =3D fread(src, 1, sizeof(src), fd);=0A=
fclose(fd);=0A=
}=0A=
else=0A=
{=0A=
printf("Can't open file '%s' for reading\n", argv[1]);=0A=
return -1;=0A=
}=0A=
=0A=
// compress the file=0A=
res =3D compress(dst, &dst_len, src, src_len);=0A=
if(res !=3D Z_OK)=0A=
{=0A=
printf("Error in compression\n");=0A=
return -1;=0A=
}=0A=
=0A=
// write compressed file=0A=
if((fd =3D fopen(argv[2], "wb")) !=3D NULL)=0A=
{=0A=
fputc(0xFF & (src_len >> 8), fd);=0A=
fputc(0xFF & (src_len ), fd);=0A=
=0A=
fwrite(dst, 1, dst_len, fd);=0A=
fclose(fd);=0A=
}=0A=
else=0A=
{=0A=
printf("Can't write file '%s'\n", argv[2]);=0A=
return -1;=0A=
}=0A=
=0A=
return 0;=0A=
}=0A=
------=_NextPart_000_0007_01C0EE92.5958C680
Content-Type: text/plain; charset=us-ascii
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
------=_NextPart_000_0007_01C0EE92.5958C680--
- Raw text -