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

习淇
2023-12-01

ubuntu 9.04请查看 http://blog.csdn.net/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

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

 

 

 类似资料: