undefined reference to `z_inflateEnd'

jameszxj jameszxj at gmail.com
Thu Dec 5 01:46:54 UTC 2019


Hi,
     When I try to call rtems_fdt_add_shell_command(​) to support device tree,  some link errors occurs.
      I have added -lz in link command line, and I have tried to change the position of "-lz", but link errors still threre.


error message:
d:/msys64/opt/rtems/5.1/bin/../lib/gcc/arm-rtems5/7.4.1/../../../../arm-rtems5/bin/ld.exe: D:/msys64/opt/rtems/5.1/arm-rtems5/xilinx_zynq_nsaboard/lib\librtemscpu.a(rtems-fdt.o): in function `rtems_fdt_load':
D:\msys64\home\ZXJ\rtems-develop\build-rtems\arm-rtems5\c\xilinx_zynq_nsaboard\cpukit/../../../../../rtems/c/src/../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:555: undefined reference to `z_inflateInit_'
d:/msys64/opt/rtems/5.1/bin/../lib/gcc/arm-rtems5/7.4.1/../../../../arm-rtems5/bin/ld.exe: D:\msys64\home\ZXJ\rtems-develop\build-rtems\arm-rtems5\c\xilinx_zynq_nsaboard\cpukit/../../../../../rtems/c/src/../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:561: undefined reference to `z_inflateEnd'
d:/msys64/opt/rtems/5.1/bin/../lib/gcc/arm-rtems5/7.4.1/../../../../arm-rtems5/bin/ld.exe: D:\msys64\home\ZXJ\rtems-develop\build-rtems\arm-rtems5\c\xilinx_zynq_nsaboard\cpukit/../../../../../rtems/c/src/../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:557: undefined reference to `z_inflateReset2'
d:/msys64/opt/rtems/5.1/bin/../lib/gcc/arm-rtems5/7.4.1/../../../../arm-rtems5/bin/ld.exe: D:\msys64\home\ZXJ\rtems-develop\build-rtems\arm-rtems5\c\xilinx_zynq_nsaboard\cpukit/../../../../../rtems/c/src/../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:559: undefined reference to `z_inflate'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:82: rtems-nsa.elf] Error 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20191205/dbc59bdc/attachment.html>


More information about the devel mailing list