Closed justdomyself closed 11 months ago
the zlib is in my compiler, but it still has errors?
You probably need to add the zlib library to your link commands with -lz
or the equivalent in your Cmake file. See the following:
You probably need to add the zlib library to your link commands with
-lz
or the equivalent in your Cmake file. See the following:
I have add below line in my cmakelists.txt,but still has this error; target_link_libraries( ${TARGET} z)
You probably need to add the zlib library to your link commands with
-lz
or the equivalent in your Cmake file. See the following: https://stackoverflow.com/questions/22337896/how-to-fix-undefined-references-to-inflate-deflate-functionsI have add below line in my cmakelists.txt,but still has this error; target_link_libraries( ${TARGET} z)
I have resolve my question。
the problem is :
I install two toolchain , one is for imx6, the other is for imx8m。 they both has zlib ,but diffrent version。
1、when I build libxlsxwriter.a, I add absolute path into cmakelists.txt in line 221:
set(ZLIB_ROOT "/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/lib")
find_package(ZLIB "1.0" REQUIRED) list(APPEND LXW_PRIVATE_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) message("zlib version: " ${ZLIB_VERSION})
2、when I build my project , I add below line in my cmakelists.txt: target_link_libraries( ${TARGET} z)
I mv .a flie to my project, and crsoss compile my project, errors happend.
the full error messge below :