Karashevich B.
Karashevich B.

Reputation: 330

Error while configuring libpng: "zlib not installed"

OS: Win7, using MinGW, sh.exe from MSYS

./configure --prefix=/mingw

with and without prefix ends like this:

checking for zlibVersion in -lz... no
checking for yeszlibVersion in -lz... no
configure: error: zlib not installed

i've installed zlib through cmake, it went smoothly and without errors, so i have all zlib files in my bin, lib and include folders
what can be the problem? how do i fix this?

UPD
looks like it's because i have libzlib.dll and not libz.dll in bin folder, but that's how it installed and i still don't know how to fix it

Upvotes: 5

Views: 7883

Answers (1)

amaneureka
amaneureka

Reputation: 1150

I recently faced this issue, And this is fixed so I can answer this question.

If you are building cross compiler Define host and path to library using CPPFLAGS and LDFLAGS.

example:

CPPFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib" ./configure --prefix=$PREFIX --host=$TARGET

If you are not building cross compiler. Then either specify the path (to library and header files) or install zlib devel package.

Upvotes: 6

Related Questions