摘要: 1. 放到系统路径下 这种容易破坏环境,不建议 2. 设置环境变量 LD_LIBARAY_PATH LD_LIBARAY_PATH=LD_LIBARAY_PATH:库路径 3. 添加路径到 /etc/ld.so.conf 添加路径到 /etc/ld.so.conf 执行命令 ldconfig 阅读全文
posted @ 2022-09-21 20:58 残月影歌 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 添加上 CentOS SCLo RH 库,装上 gdb8 的依赖 devtoolset-8-build sudo yum install centos-release-scl-rh sudo yum install devtoolset-8-build 安装相应的 gdb sudo yum inst 阅读全文
posted @ 2022-09-16 22:17 残月影歌 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 修改配置文件[/etc/rc.d/rc.local],添加开机自启脚本 关于/etc/rc.d/rc.local文件: Centos中的运行模式2、3、5都把/etc/rc.d/rc.local做为初始化脚本中的最后一个,所以用户可以在这个文件中添加一些需要在其他初始化工作之后,登录之前执行的命令。 阅读全文
posted @ 2022-09-16 11:28 残月影歌 阅读(267) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> class A{ public: explicit A(int a, int b){ // explicit 禁止隐式转换 std::cout << a << " " << b << std::endl; } }; class B{ public: expli 阅读全文
posted @ 2022-09-15 10:46 残月影歌 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 方法 1 #include <iostream> // 通过递归实现 template <int Beg, int End> struct static_for { template <typename Fn> void operator()(const Fn& fn) const { if (Be 阅读全文
posted @ 2022-09-14 09:48 残月影歌 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 1. 引言 静态链接库和动态库均为函数库 函数库:不是C语言的一部分,是一些事先写好的函数的集合,给别人复用 就像scanf和printf函数一样,通过#include <stdio.h>,即可调用 早期并没有函数库,只是后来的程序员们通过整理把日常用的函数进行合并,形成一份完整的函数库,就是现在的 阅读全文
posted @ 2022-09-08 10:46 残月影歌 阅读(1742) 评论(0) 推荐(0) 编辑
摘要: 1、文件命名规则 好的文件名命名可以很清晰的看出这个文件将要承载的内容,Google给出的规则为:文件名要全部小写, 可以包含下划线 (_) 或连字符 (-). 按项目约定来, 例如:cmd_save_player_info * my_useful_class.cc * my-useful-clas 阅读全文
posted @ 2022-09-04 10:09 残月影歌 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 用 vcpkg 安装 gdal后,自己再编译filegdb插件, release版本没问题, debug版执行 GDALAllRegister() 就崩溃。 没办法,把vcpkg下载好的gdal源码拷贝出来,修改好 nmake.opt, 用nmmake自己编译~~~ 源码位置: E:\tools\w 阅读全文
posted @ 2022-08-22 11:07 残月影歌 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 1. 测试程序 dumpTest.cpp #include <string> int main(){ int *ptr = NULL; *ptr = 10; return 0; } 2. 编译生成执行程序 程序要能被调试要加 -g gcc -g dumpTest.cpp -o dumpTest 3. 阅读全文
posted @ 2022-08-12 09:52 残月影歌 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1. 无可用源问题 进入项目的属性页 -> C/C++ -> 常规 -> 调试信息格式 -> 用于”编辑并继续“ 的程序数据库 玄学, 把源码移除后,重新加载~ 是移除不是删除~~ 2-1. release模式下生成pdb文件(vs2019) 进入项目的属性页 -> 连接器 -> 调试 -> 生成调 阅读全文
posted @ 2022-08-09 11:11 残月影歌 阅读(1206) 评论(0) 推荐(0) 编辑