deflateEnd

Posted by Microp on Thu 04 Apr 2002 05:34 AM — 4 posts, 21,664 views.

USA #0
I made the changes to the DoT code to compile on Cygwin, listed in this forum, yet I get the following when I try to compile..

.
.
.
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
117: undefined reference to `deflate'
obj/descript.o: In function `descriptor_data::begin_compression(void)':
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
726: undefined reference to `deflateInit_'
obj/descript.o: In function `descriptor_data::end_compression(void)':
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
776: undefined reference to `deflate'
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
782: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make: *** [dawn] Error 1


I searched this forum, but I found no matches to deflateEnd or end_compression(void).

I went back to the Cygwin site thinking I might of missed a download package [end_compression(void)], and downloaded several more things that I thought could be the culprit..yet no luck.

Know how I can fix this?
Amended on Thu 04 Apr 2002 05:37 AM by Microp
Australia Forum Administrator #1

The references to Deflate are to do with MCCP (Mud Client Compression Protocol) which uses the zLib library.

See this post Compiling DoT under Cygwin. The first thing it mentions is that you can't use MCCP under Cygwin. You can't have made the change suggested there.

USA #2
Here's a copy and paste of my files..




DESCRIPT.H
/**************************************************************************/
//typedef unsigned int SOCKET;
/**************************************************************************/
#define DISABLE_MCCP // add this line
#ifndef DISABLE_MCCP // define this in your project to disable MCCP
# ifdef WIN32
# ifdef WIN32_MCCP_ENABLED
# define MCCP_ENABLED
# define ZLIB_DLL




UPDATE.CPP
/* Set the virtual (CPU time) timer to the standard setting, ALARM_FREQUENCY */
void reset_itimer ()
{
struct itimerval itimer;
itimer.it_interval.tv_usec = 0; /* miliseconds */
itimer.it_interval.tv_sec = ALARM_FREQUENCY;
itimer.it_value.tv_usec = 0;
itimer.it_value.tv_sec = ALARM_FREQUENCY;

return; // doesn't work under Cygwin - add this line




Here's a copy and paste of the compile output (after I do a ./configure)..

obj/descript.o: In function `descriptor_data::write(char const *, int)':
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
117: undefined reference to `deflate'
obj/descript.o: In function `descriptor_data::begin_compression(void)':
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
726: undefined reference to `deflateInit_'
obj/descript.o: In function `descriptor_data::end_compression(void)':
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
776: undefined reference to `deflate'
/cygdrive/c/dot/dawnsrc1.69p/descript.cpp:
782: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make: *** [dawn] Error 1




The error still occurs.
Amended on Fri 05 Apr 2002 05:20 AM by Microp
Australia Forum Administrator #3
A bit depends on the order you did things.

Try getting rid of all object files and typing 'make' again.

ie. type this:

rm *.o
make