pcl icon indicating copy to clipboard operation
pcl copied to clipboard

[compile error] z_errmsg already defined in pcl_surface.lib

Open LiuPeiqiCN opened this issue 4 years ago • 0 comments

Describe the bug

Compile error LNK2005.

2>zlib.lib(zutil.obj) : error LNK2005: z_errmsg already defined in pcl_surface.lib(zutil.obj)
2>zlib.lib(zutil.obj) : error LNK2005: zlibVersion already defined in pcl_surface.lib(zutil.obj)
2>zlib.lib(zutil.obj) : error LNK2005: zlibCompileFlags already defined in pcl_surface.lib(zutil.obj)

When I build PCL static library, I have set ZLIB:

          -D BUILD_surface_on_nurbs=ON `
          -D ZLIB_LIBRARY_RELEASE="${vcpkgPath}/installed/${platform}-windows-static/lib/zlib.lib" `
          -D ZLIB_LIBRARY_DEBUG="${vcpkgPath}/installed/${platform}-windows-static/debug/lib/zlibd.lib" `
          -D ZLIB_INCLUDE_DIR="${vcpkgPath}/installed/${platform}-windows-static/include" `

https://github.com/PointCloudLibrary/pcl/blob/8d5fa69f0a/surface/src/3rdparty/opennurbs/zutil.c

Your Environment (please complete the following information):

LiuPeiqiCN avatar Dec 19 '21 09:12 LiuPeiqiCN