PDA

View Full Version : Compilation Error , Can't find lib file.



vijaydandur
7th May 2011, 19:12
Hi,
I have got a qt project from web, and I'm trying to work on it, but when i compile it I get an error " Can't find file -lz "

In the pro file I can see "-lz" is being used as below.

LIBS += -lz

Commenting out the above line, makes the project to compile but I find issues in running the project,
Can some one explain me what exactly the above statement is trying to do, and how this issue can be solved.

I'm using qt 4.7.0 on win7 64bit os.

Thanks in advance.

Regards,
Vijay.

Lykurg
7th May 2011, 20:03
It binds the z library to the project. So install the development files for z on your computer and recompile.

Just in case: zlib.net (http://zlib.net)...

vijaydandur
9th May 2011, 05:54
Hi Lykurg,
I downloaded the code from the url specified by you.
But when I checked it on the comp , i find that the same code is already present in qt installation directory.

i.e "C:\Qt\2010.05\qt\src\3rdparty\zlib"

Now could you please tell me how do I need to modify "LIBS += -lz" line in pro, to use the library from the above specified path..
I tried lot of options but nothing is working out.

Also to give you some more information, the pro file has following statements .

LIBS += -lz
win32 {
INCLUDEPATH += c:\\development\\zlib-1.2.3
LIBS += -Lc:\\development\\zlib-1.2.3
}

Kindly help on this.

Regards,
Vijay.