Sign in to follow this  
monkeyboi

zlib.lib

Recommended Posts

monkeyboi    188
I am trying to build an open source code project, in the beginning there is an error said can not open the include file <png.h>. So I installed a third party library called libpng. In the header file of png.h it includes #include "zlib.h" and the project adds zlib.lib into additional dependencies. Then I searched zlib on the internet and tried to built zlib following the instructions in this [url="http://www.achacha.org/vc2008_zlib123/"]link[/url]. After building the zlib project, there is a lib file called zlib1d.lib. Quite confused here. What is the difference between zlib1d and zlib? Can I simply change the name of zlib1d to zlib? Or am I just wrong in the beginning?

Thanks in advance

Jerry

Share this post


Link to post
Share on other sites
Cornstalks    7030
They're the same. That project file just decided to name the output lib zlib1d (I'm guess the "d" at the end there is for debug build?).

Anyway, there's a better way. If you download the latest [url="http://zlib.net/"]zlib[/url] (version 1.2.7), it includes a CMakeLists.txt, which means you can use [url="http://www.cmake.org/"]CMake[/url] to create your Visual Studio project file, and then build it in Visual Studio. In short:

Download zlib 1.2.7 source
Download and install CMake
Use CMake to generate a Visual Studio project
Use Visual Studio to then compile that project
Use your new shiny .libs (if they've got some numbers and a "d" at the end, you can just rename them if you need)

Share this post


Link to post
Share on other sites
monkeyboi    188
Thanks Cornstalks

Good to know. Actually I have downloaded 1.2.7, but don't really know how to build it so downloaded 1.2.3 again.

Jerry Edited by monkeyboi

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this