摘要: #include #include "opencv/cv.h" #include "opencv/cxcore.h" #include "opencv/highgui.h" using namespace std; #pragma comment ( lib,"opencv_highgu... 阅读全文
posted @ 2016-11-29 14:42 洛笔达 阅读(806) 评论(0) 推荐(0) 编辑
摘要: RTSP rtsp://admin:Shws1610@192.168.1.33:554/channel/01UDP 播放推导本机上的udp流 : udp://@:1234播放其他机器上的udp流 udp://ip:1234 阅读全文
posted @ 2016-11-12 23:26 洛笔达 阅读(3214) 评论(0) 推荐(0) 编辑
摘要: 准备工作: 1. VS2013 的最新更新版或者VS2015 2. QT Creater 5.7 https://www.qt.io/ 3. CMake (cmake-gui) 4. obs 依赖包,下载下来后放在自己的obs主目录下 根据自己的VS版本来下载 VS2013: https://obs 阅读全文
posted @ 2016-11-07 18:32 洛笔达 阅读(915) 评论(0) 推荐(0) 编辑
摘要: #include #include #include void fun1(char** s);void fun2(char** s);void fun3(char** s);void fun1(char** s){ char* _s = *s; *s = (char*)malloc(sizeof(c... 阅读全文
posted @ 2016-10-25 15:44 洛笔达 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 1. core文件生成打开方式: ulimit -c unlimited echo "1" > /proc/sys/kernel/core_uses_pid 看下服务器上是否安装了 gdb,没有的话要装一下 以调试模式打开程序 ./sip_gw -t2 -n 1 之后程序会crashed, 程序目录 阅读全文
posted @ 2016-10-25 10:11 洛笔达 阅读(6622) 评论(0) 推荐(0) 编辑
摘要: 1. error: ‘for’ loop initial declarations are only allowed in C99 mode 这是因为gcc基于c89标准,换成C99标准就可以在for循环内定义i变量了: gcc src.c -std=c99 -o src 2. cpp引用.c文件 阅读全文
posted @ 2016-10-14 09:35 洛笔达 阅读(1249) 评论(0) 推荐(0) 编辑
摘要: 生成可执行文件 g++ mutiprocess.cpp -o test-fpic:产生位置无关码,位置无关码就是可以在进程的任意内存位置执行的目标码,动态链接库必须使用-c : 只生成 .o 文件-o : 生成可执行文件-g : 生成可调试文件 -lworld表示libworld.so动态库文件... 阅读全文
posted @ 2016-10-08 17:11 洛笔达 阅读(710) 评论(0) 推荐(0) 编辑
摘要: 1. const指针和 指向const的指针指向const的指针: 不允许通过指针来改变其指向的const值const double *cptr*cptr = 42; // error! 指针代表的值无法修改const double pi =3.14double *ptr = &pi //erro... 阅读全文
posted @ 2016-09-27 10:04 洛笔达 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 编译程序遇到问题 relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;发现编译的程序引用的一个库(.a文件)是直接用./configure 编译的, 64位机器不能直接./conf... 阅读全文
posted @ 2016-09-23 16:53 洛笔达 阅读(12386) 评论(0) 推荐(0) 编辑
摘要: 如果不主动编写拷贝构造函数和赋值函数,编译器将以“位拷贝”的方式自动生成缺省的函数。倘若类中含有指针变量,那么这两个缺省的函数就隐含了错误。以类 String 的两个对象 a,b 为例,假设 a.m_data 的内容为“ hello”,b.m_data 的内容为“ world”。 现将 a 赋给 b... 阅读全文
posted @ 2016-09-18 17:58 洛笔达 阅读(184) 评论(0) 推荐(0) 编辑