-
-
Notifications
You must be signed in to change notification settings - Fork 257
Home
Nathan Moinvaziri edited this page Mar 13, 2021
·
31 revisions
Welcome to the zlib-ng wiki!
In order to link both zlib and zlib-ng in the same executable:
- Define ZLIB_CONST in zlib
- Compile without ZLIB_COMPAT in zlib-ng
Export following environment variables before building on Apple silicon based Macs
export ARCH_FLAGS="-arch arm64"
export SDK_NAME=macosx
export SDK_PATH=$(xcrun --show-sdk-path --sdk $SDK_NAME)
export CFLAGS="$ARCH_FLAGS -isysroot $SDK_PATH -I$SDK_PATH/usr/include"
export CXXFLAGS=$CFLAGS
export LDFLAGS="$ARCH_FLAGS"
export CC="$(xcrun -sdk $SDK_PATH --find clang) $CFLAGS"
export CXX="$(xcrun -sdk $SDK_PATH --find clang++) $CXXFLAGS"
export LD="$(xcrun -sdk $SDK_PATH --find ld) $LDFLAGS"
$ ./configure
$ make
$ make test
$ make install
Below is a list of recommended build environment minimums necessary to build zlib-ng. It is possible to build zlib-ng outside of these minimums, however support for doing so is limited.
Build system versions:
- CMake 3.5.1
- Configure script (bash/gmake)
- NMake
Compiler versions:
- Clang 6.0
- GCC 5.5
- MSVC 12.0
Compiler must support the C99 standard.
Platform versions:
- Android 18
- macOS 10.9
- Ubuntu 12.04
- Windows 7