gcc colour compile
来源:互联网 发布:贴贴相传网络曝光 编辑:程序博客网 时间:2024/04/27 18:14
Recently i changed another company, and i missed h3c a little.
Although i know h3c never like me.
Here is one of advantages of h3c : gcc compile output with different colors.
Once i think that every company does this.
Now i know the answer is NO!
So i need to do it now.
This article comes from this link : https://github.com/chinaran/color-compile
(1) compile ("\make" means using system make, not alias)
$ \make
(2) install (need root permission)
$ \make install
// copy exec program to /usr/local/bin/
// alias gcc/g++/make in ~/.bashrc
(3) test
// open a new terminal
$ make TEST (== gcc test.c -Wall)
(1) 编译 (进到项目根目录,"\make" 是使用系统make,而不是alias别名)
$ \make
(2) 安装 (需要超级权限)
$ \make install
(这一步做了两件事,一是把主程序拷贝到 /usr/local/bin/ 下,二是添加了 gcc/g++/make 的别名到 ~/.bashrc 的末尾)
(3) 测试 (新打开一个终端)
$ make TEST (== gcc test.c -Wall)
注意事项:
(1) 如果你的 gcc 版本 >= 4.9.0,可以直接使用 -fdiagnostics-color=auto 参数,显示效果应该比 color-compile 好(没试过)
(2) 如果你需要卸载或者重装,请删除 ~/.bashrc 末尾处的gcc/g++/make 别名,以免影响之后的使用。
(3) 如果你需要添加新的编译工具,可以修改Makefile 的 install: 处,以 arm-linux-gcc 为例,echo 'alias arm-linux-gcc="color_compile arm-linux-gcc"' >> $(ALIAS_FILE),或者直接修改 ~/.bashrc 都行。
(4) 如果你需要更改显示的颜色,直接修改 out_color_info.c 源码就行,其中有一些颜色定义的宏。
- gcc colour compile
- Compile gcc for Windows
- gcc color-compile
- gcc compile option -D -U
- GCC Compile and Link options
- GCC compile debug: print include files and compile stage info.
- How to compile C++ with GCC
- 转: 关于gcc compile..滴.. trap..
- Compile and install GCC in home directory
- XCode 4 - using GCC 4.0 to compile?
- uboot compile error with linaro gcc
- ARM-Linux Gcc cross Compile Environment Set
- gcc compile error :headfile not defined
- gcc compile :conflicting types for ‘do_client’
- colour name
- How to compile GCC-4.3.3 in the Linux?
- How to compile GCC-4.3.3 in the cygwin?
- Q_WS_X11 Doesn't compile with gcc 4.5.1/Qt 4.7
- 深入解析MFC -- CWinApp
- eclipse下Drools 6.x 开发环境搭建
- phonegap研究小结
- 修改ios中statusbar字体颜色
- 设计模式C++实现二:策略模式
- gcc colour compile
- oracle 01
- zoj 1256
- 吴超-----系统分层调用的艺术
- 妻子问丈夫,今年钱为什么难挣,丈夫的回答绝了
- Windows多个session下不同用户使用Global命名空间的Mutex
- Swift之旅(七)范型
- 《LRS项目重构来看"泛型"(二)——异曲同工,泛型过程和C++函数模板的比较》
- 黑马程序员----集合概述以及一些基本的方法应用