在ubuntu中安装 Source-Navigator及使用手册(类似Source Insight)

本文详细介绍了如何在Ubuntu9.04环境下手动安装最新版本的SourceNavigator6.0,包括从官网下载源码包、解压、配置、编译和安装等步骤,并解决了安装过程中可能出现的tk.tcl错误问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ubuntu 9.04请查看 http://blog.youkuaiyun.com/fangjian601/archive/2009/10/23/4718008.aspx

1 手动安装最新版本
1)到官方网站获取软件包
http://sourceforge.net/project/showfiles.php?group_id=51180
2)解压缩
tar zxvf s ourcenav-6.0.tar.gz
./configure
make
make install
ps:如果出现权限问题,前面加sudo
3)如果碰到下述错误
/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’
。。。。。。
则在终端是输入:sudo apt-get install libx11-dev
4) 启动snavigator
在终端直接输入:snavigator
5) 使用手册(user manual)
http://sourcenav.sourceforge.net/online-docs/userguide/index_ug.html
Enjoy it :)

 

 

ubuntu9.04中 安装 :

最近因为要看BlueFS的源代码,想找一个好点的源代码分析工具,发现source navigator挺不错的~

先是通过源装apt-get install sourcenav,不过源里面的版本实在是太老——5.1.4,连鼠标滚轮都不支持,所以自个儿从官网上下了一个6.0版本,手动编译~

手动编译就那么几步

./configure

make

make install

不过装好之后运行snavigator,发现提示

Can't find a usable tk.tcl in the following directories:
    /usr/local/share/tk8.3

/usr/local/share/tk8.3/tk.tcl: no event type or button # or keysym
no event type or button # or keysym
    while executing
"bind Listbox <MouseWheel> {
    %W yview scroll [expr {- (%D / 120) * 4}] units
}"
    (file "/usr/local/share/tk8.3/listbox.tcl" line 182)
    invoked from within
"source [file join $tk_library listbox.tcl]"
    invoked from within
"if {[string compare $tcl_platform(platform) "macintosh"] && /
    [string compare {} $tk_library]} {
    source [file join $tk_library button.tcl]
    so..."
    (file "/usr/local/share/tk8.3/tk.tcl" line 308)
    invoked from within
"source /usr/local/share/tk8.3/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel /#0 [list source $file]"


This probably means that tk wasn't installed properly.

郁闷了半天,不知道如何解决,看了错误代码貌似是鼠标滚轮的问题……于是乎Google之

终于在国外的一个论坛上找到解决方案,贴出来如下:

  • comment out lines 182-184 in the file /opt/sourcenav/share/tk8.3/listbox.tcl
  • comment out lines 457-459 in the file /opt/sourcenav/share/tk8.3/text.tcl

如此做过之后发现果然可以正常运行了~~

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值