Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1729989
  • 博文数量: 410
  • 博客积分: 9563
  • 博客等级: 中将
  • 技术积分: 4517
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-03 19:59
个人简介

文章分类

全部博文(410)

文章存档

2017年(6)

2016年(1)

2015年(3)

2014年(4)

2013年(32)

2012年(45)

2011年(179)

2010年(140)

分类: LINUX

2011-02-23 11:28:29


在ubuntu 10.04下的Source-Navigator 安装与问题解决
1.下载:wget
2.解压缩:tar zxvf sourcenav-6.0.tar.gz
3.配置编译:
  ./configure
  make
  sudo make install
(1)如果碰到下述错误
/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

(2)安装完成后运行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 {
    %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 30
    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.

这样的错误,则需要建立一个文件名为tk-8.4-lastevent.patch的文件,文件内容为:

--- generic/tk.h.orig    2008-02-06 16:31:40.000000000 +0100
+++ generic/tk.h    2008-07-24 08:21:46.000000000 +0200
@@ -635,17 +635,15 @@
  *
  *---------------------------------------------------------------------------
  */
-#define VirtualEvent        (LASTEvent)
-#define ActivateNotify        (LASTEvent + 1)
-#define DeactivateNotify    (LASTEvent + 2)
-#define MouseWheelEvent     (LASTEvent + 3)
-#define TK_LASTEVENT        (LASTEvent + 4)
+#define VirtualEvent        (MappingNotify + 1)
+#define ActivateNotify        (MappingNotify + 2)
+#define DeactivateNotify    (MappingNotify + 3)
+#define MouseWheelEvent     (MappingNotify + 4)
+#define TK_LASTEVENT        (MappingNotify + 5)
 
 #define MouseWheelMask        (1L << 28)
-
 #define ActivateMask        (1L << 29)
 #define VirtualEventMask    (1L << 30)
-#define TK_LASTEVENT        (LASTEvent + 4)
 
 
 /*

然后把该文件复制到sourcenav-6.0/tk/目录下,
patch -p1 < tk-lastevent.patch
然后重新编译安装:
make clean
sudo make install 

4.启动snavigator:在终端直接输入snavigator
5.使用手册

脚本文件:
#!/bin/bash
wget http://svn.exactcode.de/t2/trunk/package/develop/sourcenav-ng/tk-lastevent.patch
wget

tar zxvf sourcenav-6.0.tar.gz
cp tk-lastevent.patch sourcenav-6.0
cd sourcenav-6.0
patch -p1 < tk-lastevent.patch
./configure
make
sudo make install


  1. 在source navigator中使用vim作编辑器的方法。
  2. file->project preference->edit-> external editor: gvim --remote-silent
  3. --remote 的的意思是在已经运行的远程vim进程打开文件。 如果没有远程vim进程则启动一个进程并发出警报。
  4. -silent就是让vim在应该发出以上警告的时候闭嘴。
阅读(1809) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~