mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #410] undefined reference to symbol 'deflate' , when I cross compile #324
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#324
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @justdomyself on GitHub (Sep 18, 2023).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/410
Originally assigned to: @jmcnamara on GitHub.
I mv .a flie to my project, and crsoss compile my project, errors happend.
the full error messge below :
@justdomyself commented on GitHub (Sep 18, 2023):
the zlib is in my compiler, but it still has errors?
@jmcnamara commented on GitHub (Sep 18, 2023):
You probably need to add the zlib library to your link commands with
-lzor the equivalent in your Cmake file. See the following:https://stackoverflow.com/questions/22337896/how-to-fix-undefined-references-to-inflate-deflate-functions
@justdomyself commented on GitHub (Sep 19, 2023):
I have add below line in my cmakelists.txt,but still has this error;
target_link_libraries( ${TARGET} z)
@justdomyself commented on GitHub (Sep 19, 2023):
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)