在从 sandsmark/kdev-control-flow-graph 分支到我自己的 fljx/kdev-control-flow-graph 分支后,我成功地构建并安装了 kdev-control-flow-graph 插件,并进行了最少的更改。
但是,当我尝试启用 kdev-control-flow-graph View 时,收到以下错误:
“无法创建 KGraphViewer 实例,请验证是否安装了兼容版本。”
我在 Kubuntu 16.04 上运行 KDevelop 5.1.1 并安装了 kgraphviewer:
# apt search kgraphviewer
Sorting... Pronto
Full Text Search... Pronto
kgraphviewer/xenial,now 4:2.1.90-0ubuntu2 amd64 [installed]
GraphViz dot graph viewer
kgraphviewer-dbg/xenial 4:2.1.90-0ubuntu2 amd64
GraphViz dot graph viewer for KDE 4 debug files
kgraphviewer-dev/xenial,now 4:2.1.90-0ubuntu2 amd64 [installed]
GraphViz dot graph viewer - devel files
libkgraphviewer2/xenial,now 4:2.1.90-0ubuntu2 amd64 [installed]
GraphViz dot graph viewer - libs
然后我从 github 构建
KGraphViewer
,我的系统现在有:# find /usr -iname "*kgraphviewer*.so*" -ls
10571222 0 lrwxrwxrwx 1 root root 22 Ago 14 2015 /usr/lib/libkgraphviewer.so.2 -> libkgraphviewer.so.2.1
10571221 712 -rw-r--r-- 1 root root 728288 Ago 14 2015 /usr/lib/libkgraphviewer.so.2.1
10558158 2868 -rw-r--r-- 1 root root 2935024 Ago 17 16:32 /usr/lib/x86_64-linux-gnu/libkgraphviewer.so.3
11170876 0 lrwxrwxrwx 1 root root 57 Ago 17 16:37 /usr/lib/x86_64-linux-gnu/qt5/plugins/kdevplatform/27/kgraphviewerpart.so -> /usr/lib/x86_64-linux-gnu/qt5/plugins/kgraphviewerpart.so
10748549 180 -rw-r--r-- 1 root root 181312 Ago 17 16:32 /usr/lib/x86_64-linux-gnu/qt5/plugins/kgraphviewerpart.so
10558159 0 lrwxrwxrwx 1 root root 20 Ago 17 16:33 /usr/lib/x86_64-linux-gnu/libkgraphviewer.so -> libkgraphviewer.so.3
10571223 60 -rw-r--r-- 1 root root 60392 Ago 14 2015 /usr/lib/kde4/kgraphviewerpart.so
10571224 0 lrwxrwxrwx 1 root root 20 Ago 14 2015 /usr/lib/libkgraphviewer.so -> libkgraphviewer.so.2
任何人都可以给我一些关于如何让我的插件正确找到
KGraphViewer KPart
的提示吗?提前致谢。
最佳答案
KDE 开发人员报告。
KGraphViewer 使用 KParts 框架嵌入到其他应用程序中。将 KGraphViewer 的 KPart 移植到 Qt5/KF5 即将发布。坏消息是 kdev-control-flow-graph 不适用于新的 KGraphViewer,所以这个插件也需要更新。
关于c++ - Kdevelop 5 + kdev-control-flow-graph,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46157891/