Giter Site home page Giter Site logo

Comments (9)

huihut avatar huihut commented on June 22, 2024

这个就是因为 .pro 文件的 unix:!macx 的库路径没有修改,需要修改成当前系统的这些库的路径

from cloudcompare-qt.

sungang1985 avatar sungang1985 commented on June 22, 2024

感谢您的回复!.pro中使用的是绝对路径“-rpath=$$PWD/../../../../Release/libs”,编译后在项目同级目录下也生成了Release文件夹,所以不太明白您说的“需要修改成当前系统的这些库的路径”,能不能指导下?

from cloudcompare-qt.

huihut avatar huihut commented on June 22, 2024

是指这些库路径 qCC.pro#L368,这些是绝对路径;

生成的 Release 路径是相对路径,PWD 就是当前目录下

另外,可以一个个子项目编译,看哪个有问题,再检查 pro 文件中这些路径下是否有库安装

from cloudcompare-qt.

sungang1985 avatar sungang1985 commented on June 22, 2024

根据您的指导,我一个个子项目进行编译。
(1)编译到qHPR子项目时,报错如下:
/home/xxx/QtProject/CloudCompare-Qt-master/CloudCompare/plugins/qHPR/qHPR.cpp:41: error: qhull_a.h: No such file or directory
#include <qhull_a.h>
^
(2)对qHPR子项目的.pro文件进行了修改,新增了LIBS和INCLUDEPATH(参照macx部分,并且该路径下存在qhull):
unix:!macx{

#linux only
#编译时候指定libs查找位置
QMAKE_LFLAGS_RELEASE += -Wl,-rpath=$$PWD/../../../Release/libs -Wl,-Bsymbolic
QMAKE_LFLAGS_DEBUG += -Wl,-rpath=$$PWD/../../../Release/libs -Wl,-Bsymbolic

#指定生成路径
DESTDIR = $$PWD/../../../Release/plugins

#新增部分(其中INCLUDEPATH在markdown下换行显示有点问题)
LIBS += -lqhull

INCLUDEPATH += /usr/include/qhull
/usr/include

}
重新构建时,报错如下:

23:30:48: 为项目CloudCompare-Qt执行步骤 ...
23:30:48: 配置没有改变, 跳过 qmake 步骤。
23:30:49: 正在启动 "/bin/make" -j8

rm -f libqHPR.so.1.0.0 libqHPR.so libqHPR.so.1 libqHPR.so.1.0
g++ -Wl,-rpath,/home/xxx/QtProject/CloudCompare-Qt-master/CloudCompare/plugins/qHPR/../../../Release/libs -Wl -Wl,-rpath=/home/xxx/QtProject/CloudCompare-Qt-master/CloudCompare/plugins/qHPR/../../../Release/libs -Wl,-Bsymbolic -Wl,-rpath,/home/xxx/Qt5.12.2/5.12.2/gcc_64/lib -shared -Wl,-soname,libqHPR.so.1 -o libqHPR.so.1.0.0 ccHprDlg.o qHPR.o ccStdPluginInterface.o qrc_qHPR.o moc_qHPR.o -L/home/xxx/QtProject/CloudCompare-Qt-master/CloudCompare/plugins/qHPR/../../../Release/libs/ -lCC_CORE_LIB -lQCC_DB_LIB -L/home/xxx/QtProject/build-CloudCompare-Qt-Desktop_Qt_5_12_2_GCC_64bit-Debug/CloudCompare/plugins/qHPR/../../../Release/libs/ -lQCC_GL_LIB -L/home/xxx/QtProject/CloudCompare-Qt-master/CloudCompare/plugins/qHPR/../../../../../../../../usr/local/Cellar/qhull/2015.2/lib/ -lqhull -L/home/xxx/Qt5.12.2/5.12.2/gcc_64/lib -lQt5OpenGL -lQt5Widgets -lQt5OpenGLExtensions -lQt5Gui -lQt5Core -lGL -lpthread
g++: error: unrecognized command line option ‘-Wl’
make: *** [../../../../CloudCompare-Qt-master/Release/plugins/libqHPR.so.1.0.0] Error 1
23:30:49: 进程"/bin/make"退出,退出代码 2 。
Error while building/deploying project CloudCompare-Qt (kit: Desktop Qt 5.12.2 GCC 64bit)
The kit Desktop Qt 5.12.2 GCC 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
23:30:49: Elapsed time: 00:00.
(3)在plugins.pro中将qHPR注释掉,编译到qcc子项目时,报错如下:
error: No rule to make target ../../../CloudCompare-Qt-master/CloudCompare/qCC/images/icon/cc_viewer_icon_32.png', needed by qrc_icones.cpp'. Stop.
......
希望得到您的再次帮助!!!

from cloudcompare-qt.

huihut avatar huihut commented on June 22, 2024
  1. Qhull 库没装或者库路径错误,导致找不到
  2. 链接错误,导致因素有很多
  3. 找不到 qrc_icones.cpp 文件,看看是不是路径错误或文件缺失

构建 CloudCompare for Qt 真是蛋疼的事......

from cloudcompare-qt.

sungang1985 avatar sungang1985 commented on June 22, 2024

您好,非常感谢,第3个问题确实是路径下缺失几个png文件,从cc项目中拷过来就可以了。
但是第1个问题和第2个问题还是没有头绪,google也未找到解决办法。其实这两个问题也可以看作是一个问题:构建qHPR子项目失败。qhull 库是装的,库路径应该也没问题,但是我修改了qHPR子项目的原始.pro文件,感觉会不会是修改不对导致的,所以能不能帮我看下.pro文件新增部分:

(2)对qHPR子项目的.pro文件进行了修改,新增了LIBS和INCLUDEPATH(参照macx部分,并且该路径下存在qhull):
unix:!macx{

#linux only
#编译时候指定libs查找位置
QMAKE_LFLAGS_RELEASE += -Wl,-rpath=$$PWD/../../../Release/libs -Wl,-Bsymbolic
QMAKE_LFLAGS_DEBUG += -Wl,-rpath=$$PWD/../../../Release/libs -Wl,-Bsymbolic

#指定生成路径
DESTDIR = $$PWD/../../../Release/plugins

#新增部分(其中INCLUDEPATH在markdown下换行显示有点问题)
LIBS += -lqhull

INCLUDEPATH += /usr/include/qhull
/usr/include

}

或者能不能帮忙看下qHPR子项目的.pro文件后来是不是有修改???

from cloudcompare-qt.

huihut avatar huihut commented on June 22, 2024

那段代码 INCLUDEPATH 第一行后要一个 \,除此之外没啥问题。

INCLUDEPATH += /usr/include/qhull \
               /usr/include

如果正常安装好了qhull库还不行,那可能是qhull版本太新了(你的版本的qhull是不是没有qhull_a.h文件?),可以用这个版本试试 qhull/src2012.1,把它编译成库,然后用这个版本的include

from cloudcompare-qt.

sungang1985 avatar sungang1985 commented on June 22, 2024

您好,之前出差了一段时间,不好意思。现有的qhull库有qhull_a.h文件,所以打算按照提示用qhull/src2012.1重新编译下,但是之前没有单独编译过qhull库,请问是按照如下操作吗?

Installing Qhull with CMake 2.6 or later

To build Qhull, static libraries, shared library, and C++ interface

  • Extract Qhull from qhull...tgz or qhull...zip
  • cd build
  • cmake ..
  • make
  • make install

from cloudcompare-qt.

huihut avatar huihut commented on June 22, 2024

嗯,可以吗

from cloudcompare-qt.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.