PointCloudLibrary / PointCloudLibrary/pcl

[windows] Missing CMake error when static QHull is not present under Windows 10 (with vcpkg)

Open
#2,581 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: cmake needs: testing platform: windows
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Compuiling PCL

  • under Windows 10 with vcpkg
  • all the options enabled including tests
  • PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32 is OFF and QHull static is not present in the system

CMake did not errored about missing library and building PCL I get this error (both in Release and Debug build):

Linking CXX shared library bin\pcl_surface_release.dll
FAILED: bin/pcl_surface_release.dll lib/pcl_surface_release.lib
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=surface\CMakeFiles\pcl_surface.dir --manifests  -- C:\PROGRA~2\MIB055~1\2017\Community\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\pcl_surface.rsp  /out:bin\pcl_surface_release.dll /implib:lib\pcl_surface_release.lib /pdb:bin\pcl_surface_release.pdb /dll /version:1.8 /machine:x64 /NODEFAULTLIB:LIBCMTD  /INCREMENTAL:NO /LTCG /OPT:REF /DELAYLOAD:VCOMP140.dll   && cd ."
LINK: command "C:\PROGRA~2\MIB055~1\2017\Community\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\pcl_surface.rsp /out:bin\pcl_surface_release.dll /implib:lib\pcl_surface_release.lib /pdb:bin\pcl_surface_release.pdb /dll /version:1.8 /machine:x64 /NODEFAULTLIB:LIBCMTD /INCREMENTAL:NO /LTCG /OPT:REF /DELAYLOAD:VCOMP140.dll /MANIFEST /MANIFESTFILE:bin\pcl_surface_release.dll.manifest" failed (exit code 1120) with the following output:
   Creating library lib\pcl_surface_release.lib and object lib\pcl_surface_release.exp
concave_hull.cpp.obj : error LNK2001: unresolved external symbol qh_qh
bin\pcl_surface_release.dll : fatal error LNK1120: 1 unresolved externals

Compiling with PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=ON insead everything works smoothly.

I will investigate what happens when PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=OFF in this settings.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Windows 10/vcpkg configuration with tests enabled and PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32 set to OFF, then inspect the CMake configuration and pcl_surface link setup. Confirm that a missing static QHull library is detected during configuration rather than only producing the qh_qh linker failure; compare with the working dynamic-linking setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.