大家知道Windows下有一个很好的查看源代码的软件sourceinsight,使用sourceinsight查看Linux内核代码、嵌入式软件开发中的C语言项目源代码、驱动程序代码很是方便。在Linux下使用vim查看源代码不是很方便,于是搜了一下Linux下sourceinsight的相关替代软件,找到了一款Source
Navigator,于是就试着在Ubuntu12.04下安装了一下。但是安装之后默认字体不好看,新建一个工程很慢,个人感觉跟sourceinsight没法比,还不如使用最新Android集成的Eclipse查看方便。

参考了这两篇文章,第1篇文章的软件版本比较老,就没怎么参考,我主要参考了第二篇文章,然后在Ubuntu12.04下成功安装sourcenavigator-NG4.5。

在ubuntu中安装 Source-Navigator及使用手册

Ubuntu 12.10安装Source Navigator

一、安装sourcenavigator-NG4.5软件

1、软件下载地址为:

点击这里下载最新的源码包,我下载的是sourcenavigator-NG4.5.tar.bz2

2、将下载后的sourcenavigator-NG4.5.tar.bz2拷贝到/opt目录,并且解压到/opt目录

假定下载sourcenavigator-NG4.5.tar.bz2到/tmp目录

Ctrl+Alt+T打开终端并使用如下命令:

cd /tmp

tar -xjvf
sourcenavigator-NG4.5.tar.bz2 -c /opt

cd /opt

3、源码编译安装sourcenavigator-NG4.5

通过查看解压之后的sourcenavigator-NG4.5目录下的INSTALL文件,

我摘取了INSTALL安装说明文件中关于Linux下的安装方法:

UNIX Build:

GNU tools must be on the PATH before the configure script
is run. GNU make and gcc are required to build Source-Navigator.
If the GNU make executable on your system is installed as
gmake, type gmake instead of make in the following instructions. To build under a UNIX system, simply run the configure script.
The following commands assume that the user wants to install into
a non-default location (/opt/sourcenav) that is owned by root.
If the install directory is not owned by root, then you don't need
to become root before the make install step. % ./configure --prefix=/opt/sourcenav
% make
(become root)
% make install

所以进入到/opt目录下(即解压后的sourcenavigator-NG4.5所在目录)安装命令如下:

./configure --prefix=/opt/sourcenav

make

make install

当然也可以将上面的三条命令连起来写成一条,中间加上&&就OK了,如下:

./configure --prefix=/opt/sourcenav && make && make install

安装过程比较慢。

4、安装好sourcenavigator-NG4.5之后修改/etc/environment配置文件,

在PATH环境变量之后追加sourcenavigator-NG4.5安装后的bin目录

PATH=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/sourcenav/bin

(其中:/opt/sourcenav目录是我安装的sourcenavigator-NG4.5软件的安装目录)

5、启动snavigator

键入命令:snavigator,就可以启动了。不过前提是要将/opt/sourcenav/bin目录下的snavigator等tool工具添加到PATH环境变量中去,不然系统无法识别。

二、sourcenavigator-NG4.5使用体验

安装之后查看代码感觉字体很怪,找了半天也没找到在菜单中如何设置字体,很是郁闷。

暂时在Ubuntu12.04下查看代码还是使用QT看C++代码,Android的Eclipse查看Java代码和C语言代码吧。

最新文章

  1. The habits of highly successful people
  2. HTTP Status Code [RFC]
  3. 【noiOJ】p8208
  4. git 使用笔记
  5. 消息队列MQ
  6. JMeter二次开发(2)-编写 JSON Assertion 插件
  7. js学习笔记—转载(闭包问题)
  8. Activity透明/半透明效果的设置transparent(两种实现方法)
  9. 转:Android模拟器连接电脑网络
  10. php随笔7-thinkphp OA系统 JS 文本框输入实时控制字数
  11. 委托、Lambda和事件
  12. 解决ORA-00904: invalid identifier标识符无效
  13. 一文带你超详细了解Cookie
  14. 怎么获取泛型T.class类?
  15. vue原生table合并单元格并可编辑
  16. python3 利用pip命令安装包和模块
  17. linux 开机进入initramfs无法开机
  18. 简单解决“ORA-27100: shared memory realm already exists”的问题
  19. 给RadioButtonList绑定Selected的值
  20. [转]hisi mmz模块驱动讲解

热门文章

  1. ASP.NET Core项目目录结构介绍
  2. C++——运行时类型识别RTTI
  3. ZJUT11 多校赛补题记录
  4. shell 字符串匹配变量(只取数字或者取固定字符串)
  5. [已解决]报错: No module named pip
  6. 你不知道的USB
  7. struct解决socket黏包问题 (指令传输)
  8. 华南理工大学“三七互娱杯”程序设计竞赛 G: HRY and tree
  9. vue 条件渲染v-if v-show
  10. Ansible自动化部署K8S集群