Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 865|回复: 0
打印 上一主题 下一主题

Jansson

[复制链接]

1228

主题

1998

帖子

7598

积分

认证用户组

Rank: 5Rank: 5

积分
7598
跳转到指定楼层
楼主
发表于 2021-7-30 15:25:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 Qter 于 2021-8-2 17:00 编辑



jansson
C library for encoding, decoding and manipulating JSON data
源码下载:https://github.com/akheron/jansson

下载v2.13.1
https://github.com/akheron/jansson/tags
压缩包jansson-2.13.1.zip

cmake编译,生成对应平台下的
jansson.h
jansson_config.h
没能生成相应的工程文件

用vcpkg安装

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.bat
vcpkg integrate install
vcpkg install jansson



Downloading cmake...
  https://github.com/Kitware/CMake ... .2-windows-i386.zip
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> E:\libs\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg

A suitable version of nuget was not found (required v5.10.0). Downloading portable nuget v5.10.0...
Downloading nuget...
  https://dist.nuget.org/win-x86-commandline/v5.10.0/nuget.exe -> E:\libs\vcpkg\downloads\c4b7375e-nuget.exe
The following packages will be built and installed:
    jansson[core]:x86-windows -> 2.13.1
Warning: The following VS instances are excluded because the English language pack is unavailable.
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
Please install the English language pack.
No suitable Visual Studio instances were found


安装语言包
控制面板找到 Microsoft Visual Studio Installer 右键 “更改”  (如果提示更新,就先更新)
选择英语 语言包安装

Downloading git...
  https://github.com/git-for-windo ... 2.0.2-32-bit.7z.exe -> E:\libs\vcpkg\downloads\PortableGit-2.32.0.2-32-bit.7z.exe
  Downloading powershell-core...
  https://github.com/PowerShell/Po ... l-7.1.3-win-x86.zip -> E:\libs\vcpkg\downloads\PowerShell-7.1.3-win-x86.zip

  如果ninja-win.zip下载失败,如下
  Error: Failed to download from mirror set:
https://github.com/ninja-build/n ... 10.2/ninja-win.zip: WinHttpReceiveResponse() failed: 12152
可以按上面地址下载好直接复制到对应目录即可 .\vcpkg\downloads

Building package jansson[core]:x86-windows... done
Installing package jansson[core]:x86-windows...
Installing package jansson[core]:x86-windows... done
Elapsed time for package jansson:x86-windows: 31.13 s

Total elapsed time: 37.43 s

The package jansson:x86-windows provides CMake targets:

    find_package(jansson CONFIG REQUIRED)
    target_link_libraries(main PRIVATE jansson::jansson)

生成后放在: .\vcpkg\packages\jansson_x86-windows
















https://github.com/akheron/jansson

https://www.cnblogs.com/uestc-mm/p/10793703.html
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-5-25 01:44 , Processed in 0.055180 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表