源码阅读
引用
有哪些不错的大型项目代码浏览工具?
insight.io可以全github搜索代码的神器-要科学上网
octotree可以在github浏览文件一样浏览代码-要科学上网
chromium源码搜索-web
google codesearch
opengrok-基于web的浏览代码
doxygen生成代码文档
有函数调用关系图和类的图 非常不错
产生代码调用关系图
- c&c++代码的函数调用图生成工具codeviz
参考方法
https://www.jianshu.com/p/b3ed2b3652ac
【下载资源站点】
https://web.archive.org/web/20150502053825/http://www.csn.ul.ie/~mel/projects/codeviz/#download
【源码】
https://github.com/petersenna/codeviz
【安装】
去github的README上阅读方法
https://www.bbsmax.com/A/GBJrLeWqd0/
http://blog.csdn.net/zhutaohf/article/details/8868458
https://www.bbsmax.com/A/mo5ke7NEzw/
1、update
sudo apt-get --fix-missing update
sudo apt-get --fix-missing upgrade
2、get lib
sudo apt-get install libgv-*
sudo apt-get install graphviz graphviz-dev graphviz-doc
3、下载并解压codeviz
codeviz-1.0.12.tar.gz
tar -zxvf codeviz-1.0.12.tar.gz
4、下载gcc并拷贝到指定目录
gcc-4.6.2.tar.gz
把gcc-4.6.2.tar.gz拷贝到codeviz-1.0.12/compiler目录下
cd codeviz-1.0.12
cp ../gcc-3.4.6.tar.gz compilers/
5、在 cd codeviz-1.0.12 && 下运行
./configure && make
6、错误问题解决
gcc编译报错问题解决参照linux平台常见开发问题解决1-gcc编译报错
6.1、在编译GCC的时候,报错
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
Makefile:10: recipe for target 'all' failed
make: *** [all] Error 1
Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
这个错误参照这个帖子进行解决
http://blog.csdn.net/wfdtxz/article/details/7345541
当三个库都安装完毕后,一般的GCC错误解决方式无法解决我们这个codeviz的依赖问题,我们需要修改compilers中的install_gcc-4.6.2.sh中的内容,将下面的内容插入到.sh原文当中的Configure and compile下面的部分
--with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1
修改前
# Configure and compile
../gcc-4.6.2/configure --prefix=$INSTALL_PATH --enable-shared --enable-languages=c,c++ || exit
make bootstrap
修改后
# Configure and compile
../gcc-4.6.2/configure --prefix=$INSTALL_PATH --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1 --enable-shared --enable-languages=c,c++ || exit
make bootstrap
make之前
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib
sudo apt-get install build-essential libc6-dev libc6-dev-i386
gcc依赖这些库安装:gmp/mpc/mpfr/cloog/ppl
6.2、编译gmp-4.3.2
./configure的时候,没有生成Makefile
checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).
配置的时候 屏幕打印的错误信息
解决方法:sudo apt-get install m4
然后继续再次运行一下
【使用】
http://mstry.github.io/2016/05/15/codeviz-install-and-use/
http://www.linuxidc.com/Linux/2015-01/111501.htm
-
understand
-
navigator
太烂
这垃圾界面太烂了
代码搜索引擎
代码展示效果
网页中展示代码效果
将你的代码变成这样的效果,网址和方法如下

planetB
http://blog.csdn.net/u011303443/article/details/50992651
c++源码逆向工程生成uml类图
Rational Rose 2003 逆向工程转换C++源代码成UML类图
网友评论