![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
qq_857305819
这个作者很懒,什么都没留下…
展开
-
linux qt cmake错误的解决方法
安装cmake编译报错No CMAKE_CXX_COMPILER could be found.Tell CMake where to find the compiler by setting either the environmentvariable “CXX” or the CMake cache entry CMAKE_CXX_COMPILER to the full pathto the compiler, or to the compiler name if it is in the P原创 2022-07-14 14:18:03 · 1504 阅读 · 0 评论 -
linux系统编程
fcntl改变文件属性#include<unistd.h>#include<fcntl.h>#include <stdio.h>#include<string.h>int main(int argc, char* argv[]){ int flags = fcntl(STDIN_FILENO, F_GETFL); if (flags==-1) { return -1; } flags |= O_NONBLOCK; //文件属性设原创 2022-04-06 21:33:57 · 497 阅读 · 0 评论 -
linux 遍历文件目录
#include <stdio.h>#include <dirent.h> #include <stdlib.h> #include <string.h>#include <unistd.h>#include <error.h>#include <sys/stat.h> #define MAX_FILE_NAME_LEN 256typedef struct foldernode_t { char *p原创 2022-01-06 22:55:35 · 1348 阅读 · 2 评论 -
linux 标准设备和文件操作
标准设备stdout是系统定义好的关联屏幕设备的指针#include <stdio.h>int main(int argc, char *argv[]){ printf("111"); fclose(stdout); //关闭标准输出指针后不能打印 printf("222"); //不会打印该内容 return 0;}获取系统函数调用的错误perror(“dale”); //可以是任意字符串stdout stdin stderr:标准输出,标准输入,原创 2021-12-29 20:23:03 · 919 阅读 · 0 评论 -
linux 获取当前程序的运行目录
#include <stdio.h>#include <unistd.h>void pr_curentdir(){ char str[260]; char buf[260]; snprintf(str, sizeof(str), "/proc/self/exe"); readlink(str, buf, sizeof(str)); printf("current work path: %s\n", buf);}int main(int argc, char *ar原创 2021-12-28 21:28:27 · 889 阅读 · 0 评论 -
linux入门
基本命令移动到命令文本开始快捷键: ctrl+a移动到命令文本结束快捷键: ctrl+e清除一行文本快捷键 :ctrl+u查看命令路径: which +命令名路径相关操作linux中没有判断的概念,所有的文件都在 / 根目录下查看当前目录:pwd退到上一级目录:cd ..进入指定路径:cd + 路径目录操作创建目录mkdir +目录名**删除目录及目录下所有文件 **rm -rf + 目录拷贝目录下所有文件cp -a +拷贝的目录+目标目录列出当前目录下的文件l原创 2021-12-28 20:47:36 · 956 阅读 · 0 评论 -
VS2017 linux c++ 编译报错:Could not find the specified C/C++ compiler ‘g++‘
连接ssh后,在终端中输入如下命令即可sudo apt-get install openssh-server g++ gdb gdbserver原创 2021-12-27 21:17:34 · 1477 阅读 · 0 评论