C++第三方库
BillyJue
这个作者很懒,什么都没留下…
展开
-
libcurl 编译交叉编译https
下载openssl openssl地址:https://www.openssl.org/source/配置openssl 生成makefile./config no-asm no-async shared --prefix=/usr/local/openssl-lib --cross-compile-prefix=/home/share/hflbs_tmp/prebuilts/aarch64-rockchip-linux-gnu/bin/aarch64-rockchip-linux-gnu-...转载 2021-07-21 13:27:33 · 364 阅读 · 0 评论 -
mxml中文乱码的解决
字符编码格式判断字符编码格式可参考:https://blog.csdn.net/thedarkfairytale/article/details/73457200int IsUTF8(const char* str){ unsigned int nBytes = 0;//UFT8可用1-6个字节编码,ASCII用一个字节 unsigned char chr = *str; int bAllAscii = 1; for (unsigned int i = 0; str[i] != '原创 2021-07-07 15:55:35 · 403 阅读 · 0 评论 -
mxml的使用
1.下载mxml的地址:https://codeload.github.com/michaelrsweet/mxml/zip/refs/tags/v3.22.xml封装 xml_helper.h xml_helper.c#ifndef _XML_HELPER_H_#define _XML_HELPER_H_#pragma comment(lib,"ws2_32.lib")#define int8 char#define uint8 unsigned char#define int1原创 2021-07-06 17:35:00 · 1310 阅读 · 0 评论 -
ProtoBuf的使用
简介:1.生成vs工程打开cmake:选择protobuf下的cmake路径为源码路径,新建文件夹protobuf_win为生成路径。点击Configure弹出选择vs版本的对话框2.编译protobuf打开vs工程,分别编译 libprotobuf和protoc这两个项目:生成libprotobufd.lib、libprotocd.lib和protoc.exe5.生成***.cc和****.h文件protobuf使用需要先把消息定义好,然后编译成自己的API,加入到自己的工程中使用。转载 2021-03-19 13:38:59 · 285 阅读 · 0 评论 -
tcpserver
libevent VS下的编译参考:https://blog.csdn.net/swartz_lubel/article/details/55809970直接进入代码目录,输入nmake /f Makefile.nmake报如下错误:需要在 #include <stdint.h> 然后编译成功,生成libevent_core.lib libevent_extras.lib libevent.lib导入如下库#pragma comment(lib, "Iphlpapi.lib")转载 2021-03-17 16:33:57 · 933 阅读 · 0 评论 -
libcurl表单上传
标题cmake的编译:先config,然后generate,最后打开工程http服务器工具 :HFS测试代码如下:#include <iostream>#include "curl/curl.h"using namespace std;#define CHECK_FORM_ERROR(x) \if ((formCode = (x)) != CURL_FORMADD_OK) \{ \原创 2021-02-02 17:08:19 · 496 阅读 · 0 评论 -
用wsdl生成客户端与服务器代码
1.客户端的生成去官网下载源码http://jaist.dl.sourceforge.net/project/gsoap2/gsoap-2.8/gsoap_2.8.108.zip把gosap下面的stdsoap2.h和stdsoap2.cpp放到gosap/bin/win32下面,再把wsdl文件放到gosap/bin/win32生成头文件.h把soapC.cpp soapClient.cpp soapH.h soapStub.h stdsoap2.cpp stdsoap2.h 还有 *.ns原创 2020-11-23 10:55:34 · 818 阅读 · 0 评论 -
Kafka服务器的搭建、CMake的编译及C 调用的实现
服务器搭建参考如下配置:https://www.cnblogs.com/leju/articles/12787302.html注意Linux发送的时候需要配置监听IP,要不然发送不成功,在server.properties里面打开这个配置并配置相应的IPCMake 第二方库linux下编译,解压第三方库,进入目录下./configure --cc=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/bin/aarch64-himix100-.原创 2020-07-20 16:08:07 · 1341 阅读 · 0 评论 -
RapidXML 以Utf-8文件保存及读取
//unicode to UT8std::string to_utf8(const wchar_t* buffer, int len){ int nChars = ::WideCharToMultiByte( CP_UTF8, 0, buffer, len, NULL, 0, ...原创 2018-12-18 13:23:43 · 971 阅读 · 0 评论 -
RapidXML的读写
把如下图几个文件放到工程目录(hpp文件)新建工程进行读写测试,代码如下:// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "rapidxml.hpp"#include "rapidxml_utils.hpp" //rapidxml::file#include "rapidx...原创 2018-12-17 16:56:40 · 484 阅读 · 0 评论 -
QtXlsx配置
(1)下载QtXlsxWriterGithub上提供的项目下载地址:https://github.com/dbzhang800/QtXlsxWriter及帮助文档连接:http://qtxlsx.debao.me(2)下载Perl编译器(这是必须的)地址:https://www.activestate.com/products/activeperl/downloads/下载后安装1...转载 2019-01-18 10:20:42 · 1334 阅读 · 0 评论 -
pugixml的读写
pugixml相比rapidXML,libxml2都要快从官网下载到最新的pugixmlhttps://pugixml.org/把以下三个文件拷贝到工程目录下把hpp文件添加到头文件,.cpp文件添加源文件里面,如果工程是使用预编译头的话,需要在pugixml.cpp文件中加#include "stdafx.h"在使用的文件中添加pugixml.hpp文件就可以使用了// P...原创 2018-12-18 10:58:44 · 1537 阅读 · 0 评论 -
Libcurl window下的编译与使用
1.下载libcurlhttps://curl.haxx.se/download/curl-7.65.3.zip2.打开 VS2013 开发人员命令提示( D:\Soft\VS2013\Common7\Tools\Shortcuts目录下)进入到libcurl的目录下如图所示静态库,debugnmake /f Makefile.vc mode=static V...转载 2019-08-14 10:15:10 · 346 阅读 · 0 评论 -
CJson的使用
// cJsonDemo.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "cJSON.h"#include <windows.h>/*"semantic": { "slots": { "name": "张三" }},"type": 0;"operation" : "CALL"...原创 2019-01-03 19:09:27 · 269 阅读 · 0 评论