madler / zlib

A massively spiffy yet delicately unobtrusive compression library.

Home Page:http://zlib.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's the error reason about this?

caibf opened this issue · comments

Hello, I am compiling Open3D from the source code. It depends on zlib v1.2.13.tar.gz.
Does anyone help me solve below issue?

D:\Programs\MinGW\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin\gcc.exe -O3 -DNDEBUG -shared -o libzlib.dll -Wl,--out-implib,libzlib.dll.a -Wl,--major-image-version,1,--minor-image-version,2 -Wl,--whole-archive CMakeFiles/zlib.dir/objects.a -Wl,--no-whole-archive @CMakeFiles/zlib.dir/linkLibs.rsp

[  2%] Linking C shared library libzlib.dll
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x1796): undefined reference to `__imp_inflateEnd'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x24ab): undefined reference to `__imp_get_crc_table'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x272b): undefined reference to `__imp_inflateEnd'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x2819): undefined reference to `__imp_inflateInit2_'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x29d4): undefined reference to `__imp_crc32'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x2b5e): undefined reference to `__imp_inflate'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x2bba): undefined reference to `__imp_crc32'
CMakeFiles\zlib.dir/objects.a(unzip.obj):unzip.c:(.text+0x2e6a): undefined reference to `__imp_inflateEnd'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [CMakeFiles\zlib.dir\build.make:377: libzlib.dll] Error 1
make[1]: *** [CMakeFiles\Makefile2:92: CMakeFiles/zlib.dir/all] Error 2
make: *** [Makefile:145: all] Error 2

You'd need to ask here: https://github.com/isl-org/Open3D . Just at first glance, they may be expecting zlib to be compiled with a prefix on all external names.

@madler Are you sure it's not the compilation/linking error in the library itself? I've been researching all morning, but still can't solve the problem.

There is no __imp anywhere in zlib.

OK. I had post this issue to Open3D repo. isl-org/Open3D#6759