Menu

Error Compiling Using Common C++

Help
2000-12-02
2000-12-05
  • Dan Garwood

    Dan Garwood - 2000-12-02

    I am trying to compile not only the demos, but any source code that includes the common C++.

    BACKGROUND
    Machine: i586
    OS: Linux Mandrake release 7.1 (helium)
    Kernel: 2.2.15-4mdk
    G++: 2.95.3
    Common C++: version 1.2.0-1mdk
    GLIBC: 2.1.3-16mdk
    libstdc++: 2.95.2-12mdk

    I have tried everything mentioned in the forums, to no avail. I have moved header files around. Still to no avail. The closet I have come is using this command to compile by hand. This is coming from my config.def file in /usr/local/cc++;

    COMMAND LINE:
    g++ -D_REENTRANT -D_THREAD_SAFE -pthread  -O3 -pipe -s
    -mpentium -mcpu=pentium -lpthread -ldl -lz tcp.cpp

    RESULTS:
    /usr/bin/ld: cannot find -lz
    collect2: ld returned 1 exit status

    I do not understand this at all. What is -lz? Can anyone answer this one.

    Now if I take out the -lz I get output like everyone elses on the forums. I can post that but there is no need, since everyone else is doing this also. I have even tried the example server on the code snippets and get the same mess of output 12 miles long. Any help would be greatly appreciated.

    Dan

     
    • David Sugar

      David Sugar - 2000-12-05

      -lz, or "libz" is found in the zlib-1.1.3-10mdk package in Mandrake and should be installed on your system.  It's a common dependency for many other packages.

       
    • Dan Garwood

      Dan Garwood - 2000-12-05

      I looked an lz is there. I have completly reinstalled my server in hopes that that will fix the problem. I am going to try it again. It seems funny everyone is having the same problems with compiling the commonc++ headers in their code. Has anyone gotten the examples to work under linux of any flavor?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.