开源软件Source-Navigator安装方法

锺离韬
2023-12-01
虽然比windows下的source insight差了不少,但是linux下凑合用还可以,虽然vim+cscope可以胜任短时间内代码量小的文件,但是像linux内核源代码级别的,为了省事(我可懒得去vim下找更多插件),还是装个sourcenav吧 我安装的是最新的sourcenav-6.0 下载下来解压,我的路径是 sai@sai-laptop:~/pack/sourcenav-6.0/ 再从下面地址拷贝补丁 http://bugs.gentoo.org/attachment.cgi?id=161242&action=edit 到/sourcenav-6.0/tk目录下保存为tk-8.4-lastevent.patch,然后在/sourcenav-6.0/tk目录下运行 patch -p0 -i tk-8.4-lastevent.patch 然后先要确保如下库安装了 tk-devel-8.4.13-5.el5_1.1.i386.rpm 或 sudo apt-get install libx11-dev 不然编译过程中会碰到下述错误 /root/tk8.4.16/unix/../generic/tk3d.c:1279: error: ‘TkBorder’ has no member named ‘resourceRefCount’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘display’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘screenNum’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘TkBorder’ has no member named ‘screen’ /root/tk8.4.16/unix/../generic/tk3d.c:1281: error: ‘Tk_FakeWin’ has no member named ‘atts’ /root/tk8.4.16/unix/../generic/tk3d.c:1281: error: ‘TkBorder’ has no member named ‘colormap’ /root/tk8.4.16/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’ /root/tk8.4.16/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’ /root/tk8.4.16/unix/../generic/tk3d.c:1306: error: ‘TkBorder’ has no member named ‘nextPtr’ 。。。。。。 然后会到/sourcenav-6.0目录下 ./configure sudo make sudo make install 启动用snavigator 注意,一开始如果没打补丁,直接编译安装的话会出现 Can't find a usable tk.tcl in the following directories: /usr/local/share/tk8.3 之类的错误。。。 这个时候最后把目录删掉,重新解压,完全重头来一遍,而不要偷懒打上补丁就make ,make install 执行./snavigator就可以了 或者在桌面上生成一个链接: 1、点击右键“创建启动器...” 2、类型是“应用程序” 3、名称是SourceNavigator 4、命令是./usr/local/sourcenavigator/bin/snavigator 确定就可以启动程序了 以后每次按桌面图标就非常方便了!!
 类似资料: