LNK2019 unresolved external symbol "__declspec(dllimport) public:__cdeclQVTOpenGLNativeWidget::QVTKOpenGLNativeWidget(Class QWidget *, class QFlags<enum Qt::WindowsType>)" while using PCL-1.12.1-AllInOne-msvc2019-win64 binaries.
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cmake, cpp
- Ambito
- build-system
Direzione di ricerca
Inizia esaminando PCLConfig.cmake intorno alle righe 453, 464 e 494, quindi verifica come il pacchetto Windows di PCL-1.12.1 fornisce i componenti GUISupportQt di VTK e io_ply.dll. Confronta la configurazione segnalata con le dipendenze incluse nel pacchetto e determina se la correzione deve essere apportata al pacchetto o alla documentazione. Il lavoro è completato quando i collegamenti ai widget Qt e io_ply.dll vengono installati automaticamente, oppure quando la configurazione necessaria è documentata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Background
We have a small app that shows Point Cloud points. previously our app was using PCL 1.9.1 with its dependencies (boots 1.59.0, Eigen 3.3.7, Flann 1.8.5, VTK 8.2.0 with qt 5.7.1, QHull 8.0.2, OpenNi2 2.2.0.33) and QVTKWidget for visualization. The App was working totally fine but we came to know that in the new version of VTK 9 the QVTKWidget is deprecated and if we update the PCL 1.12.1 version then we need to update the Widget from QVTKWidget to its alternative QVTKOpenGLNativeWidget.
Error Description
So to update the PCL version from 1.9.1 to 1.12.1 we have downloaded PCL-1.12.1-AllInOne-msvc2019-win64 pre-build binaries from PCL's official GitHub release page. extracts all binaries with their dependencies updated our project CMake file and links new PCL binaries with our project first when we replaced #include <QVTKWidget.h> to #include <QVTKOpenGLNativeWidget.h> then this header file is not found. our Cmake and everything was correct. after some investigation, we discovered that the VTK version was packed with PCL-1.12.1-AllInOne-msvc2019-win64 pre-build binaries that are without QT support so that's why it does not have any GUI or QT-supported header files and libs.
Then we build VTK 9.1 (with all of its GUI components) with QT 5.15 locally and place it in the PCL dependencies directory /3rdParty/VTK link will our App. the header not found issue is resolved but we got an undefined symbol error of newly updated widget QVTKOpenGLNativeWidget.

Environment:
- OS: Windows 11
- Compiler: MSVC 2019
- PCL Version: 1.12.1
- PCL Type: Pre-build Binaries PCL-1.12.1-AllInOne-msvc2019-win64
Solution
After some investigation, we found that QVTKOpenGLNativeWidget is defined in the GUISupportQt component of VTK while in PCLConfig.cmake (shipped with PCL-1.12.1-AllInOne-msvc2019-win64) at line 494 are not including VTK GUISupportQt component that's why we're getting undefined symbol errors. these are the components that are only included in shipped PCLConfig,cmake a file
# VTK components required by PCL
set(PCL_VTK_COMPONENTS "ChartsCore;CommonColor;CommonComputationalGeometry;CommonCore;CommonDataModel;CommonExecutionModel;CommonMath;CommonMisc;CommonTransforms;FiltersCore;FiltersExtraction;FiltersGeneral;FiltersGeometry;FiltersModeling;FiltersSources;ImagingCore;ImagingSources;InteractionImage;InteractionStyle;InteractionWidgets;IOCore;IOGeometry;IOImage;IOLegacy;IOPLY;RenderingAnnotation;RenderingCore;RenderingContext2D;RenderingLOD;RenderingFreeType;ViewsCore;ViewsContext2D;RenderingOpenGL2")
we have to update the above line with the following line which included all of the following VTK components GUISupportQt, GUISupportQtQuick, GUISupportQtSQL, RenderingQt, ViewsQt, CommonSystem;glew, RenderingUI, vtksys, freetype, kissfft, pugixml, loguru, InfovisCore, FiltersHybrid, FiltersTexture, ImagingGeneral;ImagingHybrid, FiltersStatistics, ParallelDIY, ParallelCore, ImagingColor, DICOMParser, metaio;png, tiff, zlib, jpeg;fmt, doubleconversion, IOXML, IOXMLParser, jsoncpp, lz4, lzma, and expat. as
set(PCL_VTK_COMPONENTS "ChartsCore;CommonColor;CommonComputationalGeometry;CommonCore;CommonDataModel;CommonExecutionModel;CommonMath;CommonMisc;CommonTransforms;FiltersCore;FiltersExtraction;FiltersGeneral;FiltersGeometry;FiltersModeling;FiltersSources;ImagingCore;ImagingSources;InteractionImage;InteractionStyle;InteractionWidgets;IOCore;IOGeometry;IOImage;IOLegacy;IOPLY;RenderingAnnotation;RenderingCore;RenderingContext2D;RenderingLOD;RenderingFreeType;ViewsCore;ViewsContext2D;RenderingOpenGL2;GUISupportQt;GUISupportQtQuick;GUISupportQtSQL;RenderingQt;ViewsQt;CommonSystem;glew;RenderingUI;vtksys;freetype;kissfft;pugixml;loguru;InfovisCore;FiltersHybrid;FiltersTexture;ImagingGeneral;ImagingHybrid;FiltersStatistics;ParallelDIY;ParallelCore;ImagingColor;DICOMParser;metaio;png;tiff;zlib;jpeg;fmt;doubleconversion;IOXML;IOXMLParser;jsoncpp;lz4;lzma;expat")
also after adding this the unresolved symbol error are resolved but io_ply.dll were not installing automatically so again we have to update PCLConfig,cmake at line 453 and 464 to add io_ply module so that its dll should automatically be installed.
the line 453 and 464 were looks like this after updating
set(pcl_all_components common kdtree octree search sample_consensus filters 2d geometry io io_ply features ml segmentation visualization surface registration keypoints tracking recognition stereo outofcore people)
set(pcl_io_int_dep common octree io_ply )
Suggestion
My personal suggestion is that the pre-build binaries PCL-1.12.1-AllInOne- should work plug and play like manner. it should be packed and shipped with VTK (already build all of its modules with qt GUI support too) binaries and the above-required updates in PCLConfig.cmake file. if not that case then at least document the above steps in docs that how some new developer can use the above GUI components.
Refrence
I have found the above solution only on the following page on the internet thanks to him for proving this solution
https://mangoroom.cn/cpp/pcl-vtk9-x-viewer-hosted-on-qt-widget.html
- Lingua principale
- C++
- Stelle
- 11.2k
- Fork
- 4.7k
- Merge medio
- 6g 13h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PointCloudLibrary/pcl
-
kind: bug status: triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
PointCloudLibrary/pcl#6536 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
PointCloudLibrary/pcl#6509 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
kind: bug status: triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PointCloudLibrary/pcl#6537 ·
I maintainer di solito rispondono entro 3 giorni
-
[cmake] QHULL/FLANN dll missing when linking single moduleForse già presa @SIDDARTHAREDDY8 l’ha presa 6 giorni fa. Apertakind: bug module: cmake
Difficoltà 3/5 Mezza giornata Idoneità per principianti 50/100
PointCloudLibrary/pcl#6522 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
kind: bug status: triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
PointCloudLibrary/pcl#6395 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di PointCloudLibrary/pcl
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nextcloud/passman-android#214 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
feature wsl2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
microsoft/WSL#42306 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
esphome/esphome#22892 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
sec_touch: a corrupted panel ACK ends a GET as malformed while its data frame is still comingApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
distante/esphome-components#50 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno