Jump to content
  • Advertisement
Sign in to follow this  
monkeyboi

zlib.lib

This topic is 2354 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 link. 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
Advertisement
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 zlib (version 1.2.7), it includes a CMakeLists.txt, which means you can use CMake 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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!