嵌入式开发
文章平均质量分 80
木棉花语
这个作者很懒,什么都没留下…
展开
-
linux判断进程单例的一种方式
bool initSigleInstanceLock(const std::string &processName) { // bool ret=false; static const char *lockFileName="/tmp/daemon_service.lck"; int fd=-1; do{ fd=open(lockFileName,O_RDWR|O_CREAT|__O_CL...原创 2021-10-19 10:40:39 · 245 阅读 · 0 评论 -
三方库交叉编译后无法正常运行
可能是编译时检查的库版本为系统库版本,而运行时的依赖库版本与系统库版本不一致原创 2020-12-17 17:20:03 · 191 阅读 · 0 评论 -
LIBJPEG交叉编译并用其将ARGB32转JPEG
#编译脚本 build.sh#!/bin/bashgcc_prefix=$1install_dir=$2cache_dir=$3host_name=" "if test -z ${gcc_prefix} ;then gcc_prefix=/usr/bin/else host_name=arm-linuxfiif test -z ${install_dir} ;then install_dir=$(pwd)/installfiif test -z ${cache_dir} .原创 2020-07-21 16:36:18 · 371 阅读 · 0 评论 -
QT HTTP上传二进制测试
#include <QCoreApplication>#include <QNetworkAccessManager>#include <QNetworkRequest>#include <QNetworkReply>#include <QJsonObject>#include <QJsonDocument>#include<cstdio>#include <QTimer>#include &l.原创 2020-07-16 14:09:13 · 605 阅读 · 0 评论 -
ubuntu -18.04裸机 配置了QT5.14开发环境
百度网盘链接:https://pan.baidu.com/s/1Qcgxdtn2uLbkE8DYyEGCtA提取码:p70t原创 2020-04-05 13:30:36 · 396 阅读 · 0 评论 -
linux 下使用gsoap 编译生成onvif源代码+动态库
1.安装openssl2.下载gsoap3.将Makefile 与其它source置于与gsoap同级的目录下,修改makefile内的gsoap版本信息,makefile如下# Makefile of gsoapARCH ?=gsoap_vesion := gsoap-2.8root_dir := $(shell pwd)build_dir := $(root_dir...原创 2020-01-16 16:16:20 · 1283 阅读 · 0 评论 -
Upnp映射源码
支持外网IP获取,端口映射添加/删除,无三方依赖https://github.com/xuyuanwang1993/UpnpTool原创 2019-10-16 14:43:10 · 487 阅读 · 0 评论 -
linux文件补丁使用
创建test0.txt 输入12345创建test1.txt 输入 123456789在test0.txt 目录下 运行 diff -uN test0.txt test1.txt >test.patch将test0.txt 与test1.txt 内容差异输出至test.patch中将test.patch 复制至test0.txt目录中 使用patch -p0 <test....原创 2019-09-06 17:00:28 · 120 阅读 · 0 评论 -
版本号比较
#include <vector>#include <string>std::vector<std::string>split_string(std::string input,std::string spilt_token){ std::vector<std::string> ret; int find_pos; i...原创 2019-09-05 12:06:43 · 149 阅读 · 0 评论 -
UNIX套接字测试
#include "sys/epoll.h"#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <cstdio>#include <sys/types.h>#include <iostream>#include...原创 2019-08-24 11:19:52 · 145 阅读 · 0 评论 -
P2P学习记录二
/* P2P 程序客户端 * * 文件名:P2PClient.c * * 日期:2004-5-21 * * 作者:shootingstars([email protected]) * */#pragma comment(lib,"ws2_32.lib")#include "windows.h"#include "..\proto.h"#include "..\Ex...转载 2018-06-15 17:36:38 · 281 阅读 · 0 评论 -
p2p学习记录
/* P2P 程序服务端 * * 文件名:P2PServer.c * * 日期:2004-5-21 * * 作者:shootingstars([email protected]) * */#pragma comment(lib, "ws2_32.lib")#include "windows.h"#include "..\proto.h"#include "..\Ex...转载 2018-06-15 15:43:11 · 327 阅读 · 0 评论 -
onvif协议远程调节ip摄像机码流信息
先放代码:IpcInfo info; if(UI_lookup_ipc(ipc_id, info))//从数据库获取对应id的ipc信息 { return -1 ; } char *xaddr = (char *)malloc(256); memset(xaddr, '\0', 256); sprintf(xaddr, "ht...原创 2018-06-14 10:49:37 · 3084 阅读 · 0 评论