博客
分类
标签
归档
随笔
日报
博客
分类
标签
归档
随笔
日报
c重定向stdout然后恢复stdout 文件权限编码 chmod
重定向https://stackoverflow.com/questions/47719965/how-to-redirect-stdout-to-a-file-and-then-restore-stdout-back 举例#include <iostream> #include <unistd.h> #include <fcntl.h> using na...
2022-07-29
c++
linux_syscall
tool
linux
c++
tool
linux
linux_syscall
Read More
linux c隐藏输入 termios.h
参考教程https://terminalroot.com/how-to-hide-input-via-cli-with-cpp/?ref=morioh.com&utm_source=morioh.com man信息#include <termios.h>https://pubs.opengroup.org/onlinepubs/7908799/xsh/termios.h....
2022-07-27
c++
linux_syscall
tool
linux
c++
tool
linux
linux_syscall
Read More
GNU readline
自动补全,添加历史https://blog.51cto.com/u_3078781/3287204 自定义换行符https://www.igiftidea.com/article/12962763210.html 官方文档https://web.mit.edu/gnu/doc/html/rlman_2.html 快捷键使用(该库支持的)https://flyyang.me/2017/05/0...
2022-07-27
c++
language
tool
linux
c++
tool
language
linux
Read More
git配置
写得非常好的官方文档 https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%88%9D%E6%AC%A1%E8%BF%90%E8%A1%8C-Git-%E5%89%8D%E7%9A%84%E9%85%8D%E7%BD%AE 设置当前git仓库提交的用户名和邮箱git config user.name yuanzhiqiu git conf...
2022-07-26
tool
tool
Read More
linux源码编译安装gcc并添加环境变量
本例中,下载源码到$HOME/built/目录下,安装到$HOME/local/gcc-9.4.0目录下 1. 获取源码在预计放源码的目录下,比如$HOME/built/ wget -c http://ftp.gnu.org/gnu/gcc/gcc-9.4.0/gcc-9.4.0.tar.gz tar -zxvf gcc-9.4.0.tar.gz cd gcc-9.4.0 2. 下载依赖g...
2022-07-22
fix_error
tool
linux
tool
linux
fix_error
Read More
linux源码编译安装boost库1.56版本
1. 获取源码wget -c --no-check-certificate http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz #下载源码 tar -xzvf boost_1_56_0.tar.gz #解压源码 cd boost_1_56_0 #进入源码目录 2. 修改bootstrap....
2022-07-21
fix_error
tool
linux
tool
linux
fix_error
Read More
gdb
关注报错信息(搜索报错号) -rdynamic -g 编译,直接gdb运行(-rdynamic可以方便监控可能的段错误) 报错型bug调试建议:bt,从最靠近栈顶你写的函数,l那个函数和上一层函数,看p info这个函数的参数对不对(如果不好p info又没有写打印代码的话,先改源码在这个函数里面刚入口的地方加打印,然后r)不断向栈底看,直到参数没有问题的函数(就是它调用接下来的函数...
2022-07-10
debug
tool
linux
tool
linux
debug
Read More
linux下源码编译安装 设置环境变量
设置环境变量先学习下如何设置环境变量 To make the variable settings effect for each bash shell, put the exporting command to your ~/.bashrc, the individual per-interactive-shell startup file. bash中用于设置环境变量的语法如下 expor...
2022-07-10
fix_error
tool
linux
tool
linux
fix_error
Read More
strace 输出所有系统调用
strace <a.out>
2022-07-10
debug
tool
linux
tool
linux
debug
Read More
linux源码阅读开发环境搭建
vscode阅读linux源码方法一 一站式配置vscode目前存在的问题:仍然有一些红线报错,但是不影响跳转定义 vscode 安装插件 Remote-SSH:本机安装 C/C++ 插件:remote安装(在remote安装插件的方法:先Remote-SSH连接上remote) 编译内核源码[编译内核(简单版)](# 编译内核(简单版)) 获取.vscode和生成compile...
2022-07-09
fix_error
tool
linux
tool
linux
fix_error
Read More
Previous
6 / 7
Next
粘贴文本
全选文本
剪切文本
复制文本
站内搜索
必应搜索
新标签页打开
复制链接地址
复制图片
谷歌识图
常见问题
示例博客
加入社区
本站源码
主题源码
暗黑模式
打印页面
阅读模式