【问题标题】:PCL 1.8.0 installation: Compile error for including QtGuiPCL 1.8.0 安装:包含 QtGui 的编译错误
【发布时间】:2017-04-04 19:50:47
【问题描述】:

我正在尝试按照these 的说明在我的 Ubuntu 14.04 机器上从源代码构建 PCL 1.8.0。但是每次我收到以下错误:

[ 73%] Building CXX object apps/CMakeFiles/pcl_manual_registration.dir/include/pcl/apps/moc_manual_registration.cpp.o
In file included from ~/pcl/release/apps/ui_manual_registration.h:26:0,
             from ~/pcl/release/apps/include/pcl/apps/../../../../../apps/include/pcl/apps/manual_registration.h:37,
             from ~/pcl/release/apps/include/pcl/apps/moc_manual_registration.cpp:9:
/usr/include/vtk-5.8/QVTKWidget.h:40:25: fatal error: QtGui/QWidget: No such file or directory
    #include <QtGui/QWidget>
                     ^
compilation terminated.
make[2]: *** [apps/CMakeFiles/pcl_manual_registration.dir/include/pcl/apps/moc_manual_registration.cpp.o] Error 1
make[1]: *** [apps/CMakeFiles/pcl_manual_registration.dir/all] Error 2
make: *** [all] Error 2

对于locate QWidget,我得到以下输出:

...
/usr/include/qt4/QtGui/QWidget
...
/usr/include/qt5/QtWidgets/QWidget
...

那么我该如何解决错误并安装 pcl?

【问题讨论】:

    标签: ubuntu-14.04 qwidget point-cloud-library


    【解决方案1】:

    出现问题是因为您的配置试图在 PCL 构建期间混合 Qt4 和 Qt5。 根据您提供的链接,PCL 应该是在这种情况下针对 Qt4 构建的。

    尝试删除 release 目录中的所有内容并使用正确版本的 Qt 重新初始化 CMake 配置。

    这样(以下提供的示例):

    cd ~/Documents/pcl
    rm -rf relese
    mkdir release 
    cd release 
    cmake -DCMAKE_BUILD_TYPE=Release -DPCL_QT_VERSION=4 -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON .. 
    make 
    

    【讨论】:

      猜你喜欢
      • 2014-06-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-22
      • 2012-06-27
      • 2018-02-28
      • 1970-01-01
      • 2017-08-03
      • 2014-02-28
      相关资源
      最近更新 更多