Comments (3)
It really depends on your build environment. If building from command line with qmake
, running qmake LIBS+=-lz
is enough. If building from Qt Creator, specifying LIBS+=-lz
in the project settings will do. It is really machine-specific, that's why it isn't in the .pro
file.
from quazip.
Ok, I just saw your comments per #23 right after I posted, of course.
I was just hoping for an approach to treat submodule more independently (didn't require changes to top-level parent project or build), but it is workable.
from quazip.
I use the following quazip_static.pri for Windows, Mac and Linux:
Requires Qt5 on Windows due to header fun and games for static builds, though this might no longer be necessary.
DEFINES *= QUAZIP_STATIC
include($$PWD/../quazip.pri)
win32 {
# On Windows zlib.h is not an SDK header
# Redirect to the Qt5 one
greaterThan(QT_MAJOR_VERSION, 4) {
INCLUDEPATH *= $$PWD
HEADERS += $$PWD/zlib.h
} else {
# There isn't a neat workaround in older versions of Qt
error(quazip_static.pri requires Qt5 or later)
}
}
unix {
# Unix (Linux, Mac, BSD) have a system zlib library
LIBS += -lz
}
Obviously update the include() path to find quazip/quazip.pri
as needed.
The zlib.h referred to contains the following:
// Workaround for zlib.h on Windows
// Requires Qt5
#ifdef WIN32
#include <QtZlib/zlib.h>
#endif
I'm not sure if that's actually still needed for static builds, as I first did this around QuaZip 0.7.1
from quazip.
Related Issues (20)
- Can't build with QUAZIP_USE_QT_ZLIB on qt6 on windows HOT 3
- minizip supports bzip (if activated when compiling). Why doesn't quazip support bzip? HOT 17
- Linking issues with libz.so on Ubuntu HOT 6
- Suggestion: include version information in a header or through a function HOT 4
- Possibility to build without QTextCodec HOT 3
- error: LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QStringList __cdecl JlCompress::extractDir(class QString,class QString)" (__imp_?extractDir@JlCompress@@SA?AVQStrin HOT 2
- Header directory QuaZip-Qt6-1.3/quazip might be confusing ? HOT 2
- Please tag older versions
- Comment is not read in ZIP64 archive
- Change "Host OS" from Unix to FAT HOT 6
- Detection of Qt is flawed. HOT 7
- pkgconfig file doesn't require bzip2 library.
- Quazip does not compile with Qt6.4 (mingw32) on Windows HOT 5
- Unable to open a zip file in the application resources on Windows
- Failed to build quazip for Android using qt 6.3.2 HOT 1
- Duplicated symbols when linking with minizip HOT 1
- QUAZIP_USE_QT_ZLIB doesn't work on Qt version 6.3.1 HOT 1
- Compilation Quazip Qt6.4 (mingw32) on Windows
- Failed to build Quazip with Qt6.5.0 (MacOS M1 ventura) HOT 3
- QuaZipFile::open(OpenMode mode, const QuaZipNewInfo& info ...) does not set fileName
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quazip.