Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:39:29+00:00 2026-06-12T01:39:29+00:00

Here is the error snippet /home/jamesblack/Development/v2server/svr_tick.c:1309: undefined reference to `deflateEnd’ This happens when I

  • 0

Here is the error snippet

/home/jamesblack/Development/v2server/svr_tick.c:1309: undefined reference to `deflateEnd'

This happens when I run my makefile, it looks like it runs this command.

gcc -O -g -lm -lz -lcrypt -o server .obj/server.o .obj/svr_disk.o .obj/svr_tick.o .obj/svr_act.o .obj/driver.o .obj/svr_god.o .obj/svr_do.o .obj/svr_glob.o .obj/build.o .obj/use_driver.o .obj/look_driver.o .obj/svr_effect.o .obj/driver_etc.o .obj/driver_generic.o .obj/populate.o .obj/helper.o .obj/skill.o .obj/skill_driver.o .obj/talk.o .obj/area.o .obj/path.o .obj/stunrun.o .obj/cityattack.o .obj/npc_malte.o .obj/lab9.o .obj/rdtsc.o .obj/ccp_driver.o  

And then it spouts of alot of errors similar to that, everything i’ve googled mentions installing zlib and linking it with -lz, which is clearly in the make command, also im pretty sure i installed it right. apt-get install zlib1g-dev in ubuntu 11 64bit

Any thoughts

EDIT:

My zlib.h located at /usr/local/zlib/include/zlib.h includes this

ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
/*
 All dynamically allocated data structures for this stream are freed.
This function discards any unprocessed input and does not flush any pending
output.

 deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
stream state was inconsistent, Z_DATA_ERROR if the stream was freed
prematurely (some input or output was discarded).  In the error case, msg
may be set but then points to a static string (which must not be
deallocated).
*/

Is this what I need it to have? Also echo $LD_LIBRARY_PATH doens’t return anything. Do I truly have Zlib configure properly?

EDIT 2:

gcc -I/usr/local/zlib/include -O -g -lm -lz -lcrypt -o server .obj/server.o .obj/svr_disk.o .obj/svr_tick.o .obj/svr_act.o .obj/driver.o .obj/svr_god.o .obj/svr_do.o .obj/svr_glob.o .obj/build.o .obj/use_driver.o .obj/look_driver.o .obj/svr_effect.o .obj/driver_etc.o .obj/driver_generic.o .obj/populate.o .obj/helper.o .obj/skill.o .obj/skill_driver.o .obj/talk.o .obj/area.o .obj/path.o .obj/stunrun.o .obj/cityattack.o .obj/npc_malte.o .obj/lab9.o .obj/rdtsc.o .obj/ccp_driver.o 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:39:30+00:00Added an answer on June 12, 2026 at 1:39 am

    Put the libraries after the object files, so modify the makefile or rewrite the link command so that instead of being like this (as in the question):

    gcc -O -g -lm -lz -lcrypt -o server .obj/server.o .obj/svr_disk.o .obj/svr_tick.o \
        .obj/svr_act.o .obj/driver.o .obj/svr_god.o .obj/svr_do.o .obj/svr_glob.o \
        .obj/build.o .obj/use_driver.o .obj/look_driver.o .obj/svr_effect.o \
        .obj/driver_etc.o .obj/driver_generic.o .obj/populate.o .obj/helper.o \
        .obj/skill.o .obj/skill_driver.o .obj/talk.o .obj/area.o .obj/path.o \
        .obj/stunrun.o .obj/cityattack.o .obj/npc_malte.o .obj/lab9.o \
        .obj/rdtsc.o .obj/ccp_driver.o  
    

    It should be like this:

    gcc -O -g -o server .obj/server.o .obj/svr_disk.o .obj/svr_tick.o .obj/svr_act.o \
        .obj/driver.o .obj/svr_god.o .obj/svr_do.o .obj/svr_glob.o .obj/build.o \
        .obj/use_driver.o .obj/look_driver.o .obj/svr_effect.o .obj/driver_etc.o \
        .obj/driver_generic.o .obj/populate.o .obj/helper.o .obj/skill.o \
        .obj/skill_driver.o .obj/talk.o .obj/area.o .obj/path.o .obj/stunrun.o \
        .obj/cityattack.o .obj/npc_malte.o .obj/lab9.o .obj/rdtsc.o .obj/ccp_driver.o \
        -lm -lz -lcrypt
    

    The linker only pulls in symbols from shared libraries if at least one of the symbols satisfies an outstanding undefined reference; when the libraries come first, they don’t usually have a main() and that’s what the linker is looking for to start with. (This is a change of behaviour; a few years ago, the linker tended to pull in every shared library, regardless of whether it satisfied any undefined symbols.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know why I'm facing that error ! Here is my code snippet
Does somebody see error here. Whats wrong with this typedef A<B<T>::c> ?? template <const
I am getting the following error here: http://mvcbense.azurewebsites.net/ Invalid object name 'dbo.BlogPosts'. This is
I am getting this error here is my code if(isset($_POST['submit'])) { $projTit=mysql_escape_string($_POST['projecttitle']); $projCat=mysql_escape_string($_POST['projectcategory']); $budget=intval(mysql_escape_string($_POST['budget']));
i am developing parser using bison...in my grammar i am getting this error Here
Guys i need some help here , im getting this error here at the
Here's a snippet which causes an error: net.grinder.scriptengine.jython.JythonScriptExecutionException: SyntaxError: ('invalid syntax', ('C:\\grinder-3.7.1\\lib \\.\\nb-romg-file-store\\current\\grinder_test.py', 131,
I'm getting a Variable TMP_1 might not have been initialized error. Here's the snippet:
I have this snippet of code here. The intention is to make a copy
Here is the code snippet, this goes into an infinite loop - with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.