5.7. Setting up Zlib Source

A small Hello World program is not enough to know all features of CDT. We need something substantially more. Something little complex. Some independent existing piece of software. For this the Zlib version 1.2.3 source code has been used in this book.

If you wish, you can also learn by practice and see exactly similar screen shots in your environment.

Setup the necessary toolchains (if required). The version of Zlib used in this project can be downloaded from http://sourceforge.net/projects/libpng/files/zlib/1.2.3/

Note

As of 2010.04.19, latest version of Zlib is 1.2.5. Use 1.2.3 version for testing purpose only.

Try to build Zlib on Windows command line, with MinGW.

  1. Descend to C:\sw\src\zlib\1.2.3\zlib-1.2.3 directory.

  2. Run

    make -f win32/Makefile.gcc all
    
  3. For debug builds, run

    make -f win32/Makefile.gcc LOC="-DDEBUG -g" all
    
  4. To clean the project, run

    make -f win32/Makefile.gcc clean
    

If that is successful, follow steps in Externally Managed Build. If it fails, have a word with the author.