Qtcrreator 4 (Qt5.7) on rhel 7 x86_64 添加配置astyle,美化代码配置方法

安装配置astyle

1. 下载astyle

https://sourceforge.net/settings/mirror_choices?projectname=astyle&filename=astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz

2. 编译

tar -xvf  astyle_2.05.1_linux.tar.gz

cd astyle/build/gcc  
  1.  make 
  2. make install                               #安装astyle到/usr/bin目录下。
  3. make clean

3. 拷贝

cp /usr/bin/astyle /opt/Qt5.7.0/

4. 设置
   1) 进入Qt Creator设置.
   2) Tools->Options.. 进入设置.
   3)左侧选Environment. 右侧选External Tools. 设置外部工具.
   4) 点击下方的add 按钮. 选add tools. 新增astyle.
   5)选中刚添加的astyle配置参数:
      执行文件: /opt/Qt5.3.0/astyle  astyle可执行文件放置到目录
      参数: --A2 --s2 %{CurrentDocument:FilePath}

     在Tools->External菜单中就出现了astyle

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值