3、https openssl windows linux两种系统通用
系统平台:windows11 ubuntu-22.04
工具:vs2022 17.7.6
服务器版本:mongoose-7.12
其他工具:openssl-3.1.3
zlib-1.3
curl-8.4.0
Windows11 编译mongoose https openssl位置 C:\Users\steven_roc\Desktop\OpenSSL-Win64\lib
1、在源码主文件头文件加入支持SSL
#include “mongoose-7.12/mongoose.h”
#include “openssl/applink.c”
2、在mongoose.h 增加
#define MG_TLS 2
#ifdef __cplusplus
extern “C” {
#endif
/////////////////////////{{{{{{{{{{{{{{
#define MG_TLS 2
3、下载
OpenSSL-3.1.Win64.20230803,下载解压到桌面
Linux编译如下:
cd /opt/http-restful-server
gcc http-restful-server-7.12.c mongoose.c -W -Wall -Wextra -g -I. -DMG_ENABLE_OPENSSL=1 -I/opt/openAI/Lib64U/include -I-L /opt/openAI/Lib64U/lib64/libssl.so.3 /opt/openAI/Lib64U/lib64/libcrypto.so.3 -o httpdm




自适应IP