Re: [Interest] Project using QuaZip needs zlib headers

2012-12-06 Thread Thiago Macieira
On quinta-feira, 6 de dezembro de 2012 23.39.36, Tony Rietwyk wrote:
 Since my first post, I have found that on Mac OSX the application compiles,
 but the link fails to resolve the calls to zlib.  The same .pro file links
 and runs OK on Windows.
 
 I need to know how to include and link against the same zlib used by Qt.
 Using a separate copy of the zlib code in the same executable seems to be
 asking for trouble.

On Mac OS X, you can do this:

LIBS += -lz

As for Windows, it seems you ran into a misfeature of Qt: the zlib symbols are 
exported from QtCore so that other libraries like QtNetwork can use it. DO NOT 
depend on this misfeature. Now that you've brought it to my attention, I might 
fix it.

Windows has no system zlib. You need to find a copy for yourself.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center


signature.asc
Description: This is a digitally signed message part.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Project using QuaZip needs zlib headers

2012-12-05 Thread Tony Rietwyk
Hi Everybody, 

I just incorporated the QuaZip project into my Qt 4.8.3 application which is
built on Windows, Mac OS and Debian platforms.   quazip/zip.h refers to
zlib.h.   In order to compile I have added this line to my .pro file:  

INCLUDEPATH += $$QMAKE_LIBDIR_QT/../src/3rdparty/zlib

This seems quite a hack.  What is the correct way to resolve this reference?


Thanks! 

Tony.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Project using QuaZip needs zlib headers

2012-12-05 Thread Andreas Pakulat
Hi,

On Thu, Dec 6, 2012 at 8:04 AM, Tony Rietwyk t...@rightsoft.com.au wrote:
 I just incorporated the QuaZip project into my Qt 4.8.3 application which is
 built on Windows, Mac OS and Debian platforms.   quazip/zip.h refers to
 zlib.h.   In order to compile I have added this line to my .pro file:

 INCLUDEPATH += $$QMAKE_LIBDIR_QT/../src/3rdparty/zlib

 This seems quite a hack.  What is the correct way to resolve this reference?

It is a hack, in fact it'll make your project unbuildable for anybody
using a binary-only-qt (be it distribution packages or some other
source). So you have to consider zlib the same as QuaZip itself, i.e.
either integrate it into your project as you did with QuaZip or have
some configure script which finds a working zlib header and library to
link QuaZip against (or lets the user point to one) and setup the .pro
files accordingly.

Andreas
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest