I would like to know if anyone knows how I can solve the error: libQt6OpenGL.so.6: cannot open shared object file: No such file or directory
On my CMakeLists.txt I have the following:
cmake_minimum_required(VERSION 3.22)
project(PRJ)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_PREFIX_PATH "/opt/Qt/6.3.0/gcc_64/lib/cmake")
find_package(Qt6 REQUIRED COMPONENTS Widgets OpenGLWidgets)
set(VTK_DIR "/usr/local/include/vtk-9.1/")
find_package(VTK REQUIRED)
find_package(PCL 1.12 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable(PRJ ...)
target_link_libraries(PRJ PRIVATE ${VTK_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS} Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
I am using KUbuntu 22.04
with Qt6.3. PCL version 1.12
, VTK 9.1
and OpenCV 4.5.5
.