随笔分类 -  c/c++

摘要:execl函数:头文件: #include<unistd.h>功能: 为进程重载0-3G的用户空间,可与fork函数搭配使用语法: int execl("绝对路径", “标识符”, “需要的参数”(需要多少传入多少) ,NULL);返回值 :失败返回 -1 NULL 最后这个必须传NULL,否则函数 阅读全文
posted @ 2023-02-13 17:10 angry_gladiator 阅读(24) 评论(0) 推荐(0)
摘要:指定gcc版本:update-alternatives --config gcc 指定gcc版本:update-alternatives --config g++ 阅读全文
posted @ 2023-02-13 17:01 angry_gladiator 阅读(41) 评论(0) 推荐(0)
摘要:CMake平台判断: if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64)") #### elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64)") #### endif() 阅读全文
posted @ 2023-02-13 16:50 angry_gladiator 阅读(250) 评论(0) 推荐(0)
摘要:在CMakeLists添加: set(CMAKE_CXX_FLAGS "-fsanitize=undefined,address,leak -fno-omit-frame-pointer")set(CMAKE_C_FLAGS "-fsanitize=undefined,address,leak -f 阅读全文
posted @ 2021-02-23 17:09 angry_gladiator 阅读(808) 评论(0) 推荐(0)
摘要:1.使用set命令显式定义变量及赋值 2.变量使用${xxx}引用 3.循环语句: 1.Set(VAR a b c) Foreach(f ${VAR}) … Endforeach(f)2. WHILE() … ENDWHILE() 4.CMAKE_CXX_COMPILER:指定C++编译器 5.CM 阅读全文
posted @ 2021-02-23 16:49 angry_gladiator 阅读(119) 评论(0) 推荐(0)
摘要:coredump和应用日志如下图: 造成原因: 代码:QDBusInterface iface("com.deepin.movie", "/", "com.deepin.movie");iface.asyncCall("openFiles", toOpenFiles);原因:asyncCall在ar 阅读全文
posted @ 2020-11-24 09:42 angry_gladiator 阅读(179) 评论(0) 推荐(0)
摘要:前置条件: qputenv("QT_WAYLAND_SHELL_INTEGRATION", "kwayland-shell"); QSurfaceFormat format;format.setRenderableType(QSurfaceFormat::OpenGLES); format.setD 阅读全文
posted @ 2020-10-14 14:57 angry_gladiator 阅读(860) 评论(0) 推荐(0)
摘要:export LD_LIBRARY_PATH=qtbuilddir/lib:dtkbuilddir/lib 说明: 设置程序运行是链接库的路径 export QT_QPA_PLATFORM_PLUGIN_PATH=qtbuilddir/plugins/platforms 说明: 平台相关插件 exp 阅读全文
posted @ 2020-10-13 11:25 angry_gladiator 阅读(813) 评论(0) 推荐(0)
摘要:原文地址:http://www.cnblogs.com/boolcloth/p/7224231.html1,构造函数,创建一个非gui事件循环 QCoreApplication(int &, char **) 2,析构函数 ~QCoreApplication() 3, ApplicationFlag 阅读全文
posted @ 2020-09-28 16:04 angry_gladiator 阅读(2137) 评论(0) 推荐(0)
摘要:可使用一下两个函数 : 1. QStringList QStandardPaths::standardLocations(QStandardPaths::StandardLocation type) 2.QString QStandardPaths::writableLocation(QStanda 阅读全文
posted @ 2020-09-22 17:46 angry_gladiator 阅读(507) 评论(0) 推荐(0)