Open DLinIoTedge opened 3 years ago
apt install zlib1g-dev
-lz
to your CMakefile
(to anywhere you like to define the target_link_libraries
). In the CMakefile. Only ${CPPRESTSDK_LIBRARY} ${OPENSSL_LIBS} ${Boost_LIBRARIES}
are added, but not the ZLIB_LIBRARY
one.
# library search paths ...
if(APPLE)
set(OPENSSL_LIBS "/usr/local/Cellar/openssl/${OPENSSL_VERSION}/lib/libssl.1.0.0.dylib;/usr/local/Cellar/openssl/${OPENSSL_VERSION}/lib/libcrypto.1.0.0.dylib")
set(CPPRESTSDK_LIBRARY "${PROJECT_SOURCE_DIR}/libs/cpprestsdk/build.release/Binaries/libcpprest.a")
set(ZIP_LIBRARY "/usr/local/Cellar/zlib/1.2.11/lib/libz.dylib")
set(LIBRARIES_SEARCH_PATHS ${OPENSSL_LIBS} ${Boost_LIBRARIES} ${CPPRESTSDK_LIBRARY} ${ZIP_LIBRARY})
else()
set(OPENSSL_LIBS "${OPENSSL_LIBRARIES}")
set(CPPRESTSDK_LIBRARY "${PROJECT_SOURCE_DIR}/libs/cpprestsdk/build.release/Binaries/libcpprest.a")
set(LIBRARIES_SEARCH_PATHS ${CPPRESTSDK_LIBRARY} ${OPENSSL_LIBS} ${Boost_LIBRARIES})
endif()
Please verify why is falling into the APPLE case, due to you are on Linux it should no be looking for the zip library.
Hello Ivan, good morning.
I am working with steps and code given in https://github.com/ivanmejiarocha/micro-service , during mentioned workflow there is challenge coming up from non availability of functions from zlip
Machine: Ubuntu 18.04 X86 AMD libcpprest.a is created by using ./build_dependencies.sh cmake is done in micro-service/build$
make -j 8 the following error message coming ( done in micro-service/build )
_http_compression.cpp:(.text._ZN3web4http11compression7builtin20zlib_compressor_base8compressEPKhmPhmNS1_14operation_hintERmRb[_ZN3web4http11compression7builtin20zlib_compressor_base8compressEPKhmPhmNS1_14operationhintERmRb]+0x17f): undefined reference to `deflate' collect2: error: ld returned 1 exit status
HINT ZIP_LIBRARY appears to be empty in after
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. @ivanmejiarocha Could you kindly advice Thanks a lot in advance jk