随笔分类 -  CC++

cmake 指定gcc路径
摘要:export CC=/usr/local/bin/gcc export CXX=/usr/local/bin/g++ export LD_LIBRARY_PATH=/usr/local/gcc-4.7.2/lib:$LD_LIBRARY_PATH cmake /path/to/your/projec 阅读全文

posted @ 2019-12-16 10:24 不忘初衷,方能致远 阅读(2383) 评论(0) 推荐(0)

c++ 开源库
摘要:http://www.partow.net/programming/exprtk/ 数学表达式 阅读全文

posted @ 2019-12-11 15:54 不忘初衷,方能致远 阅读(160) 评论(0) 推荐(0)

一些有用的cpp 库
摘要:http://www.partow.net/programming/exprtk/ 阅读全文

posted @ 2019-05-21 20:45 不忘初衷,方能致远 阅读(227) 评论(0) 推荐(0)

string, wstring 的 length和size
摘要:wstring size和length 返回的是字符数string size和length返回的是字节数 utf8的 wchar 在linux是4字节的,而不是windows的 unsigned short 两字节 阅读全文

posted @ 2019-05-15 10:47 不忘初衷,方能致远 阅读(1073) 评论(0) 推荐(0)

c++的wstring,基于的wchar_t 在linux上是4字节的
摘要:sizeof wchar_t. Unlike Windows UTF-16 2-byte wide chars, wchar_t on Linux and OS X is 4 bytes UTF-32 (gcc/g++ and XCode). ucs2是unicode的子集,编码上。 阅读全文

posted @ 2018-12-07 16:48 不忘初衷,方能致远 阅读(557) 评论(0) 推荐(0)

gcc g++ 链接库的坑
摘要:假设我们需要用到两个静态库:libtest1.a和libtest2.a,其中libtest2.a中又使用了libtest1.a中的接口。 那么我们可以这样使用:(原来三种使用方式中的1、2其实是一种,后面只列出其中之一) 1. gcc –o test main.c libtest2.a libtes 阅读全文

posted @ 2018-12-07 11:44 不忘初衷,方能致远 阅读(251) 评论(0) 推荐(0)

cmake 常见问题
摘要:命令行: if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Debug") endif() 阅读全文

posted @ 2018-11-29 12:11 不忘初衷,方能致远 阅读(155) 评论(0) 推荐(0)

GDB调试STL容器
摘要:https://blog.csdn.net/luoleicn/article/details/5968038 GDB中print方法并不能直接打印STL容器中保存的变量,其实只要http://www.yolinux.com/TUTORIALS/src/dbinit_stl_views-1.03.tx 阅读全文

posted @ 2018-08-24 17:34 不忘初衷,方能致远 阅读(580) 评论(0) 推荐(0)

stl sort 的comp 函数对象
摘要:下面代码会core: 改成 阅读全文

posted @ 2018-08-09 16:23 不忘初衷,方能致远 阅读(199) 评论(0) 推荐(0)

trie 字典树相关
摘要:https://tessil.github.io/2017/06/22/hat-trie.html https://github.com/Tessil/hat-trie 阅读全文

posted @ 2017-12-14 19:59 不忘初衷,方能致远 阅读(132) 评论(0) 推荐(0)

导航