构建 jsoncpp (Linux) - 给我们凡人的指导?
我正在尝试在 Ubuntu 10.x 上构建 jsoncpp - 但是“说明”有时很模糊。例如,在构建 lib 之前,尚不清楚 scons.py 文件需要驻留在哪个文件夹中。
有人可以概述构建 jsoncpp 库所需的步骤吗?在 Linux 上,或者失败了,如果有人知道任何包含此信息的在线资源,请分享链接。
I am trying to build jsoncpp on Ubuntu 10.x - however the 'instructions' are at times vague. For example, it is not clear exactly which folder the scons.py file needs to reside in before the lib can be built.
Can someone outline the steps required to build the jsoncpp library? on Linux, or failing that, if anyone is aware of any online resource with this info, please share the link.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这就是我所做的:
jsoncpp 似乎不会自行安装,因此当您构建使用该库的应用程序时,您必须手动将库和头文件复制到您想要的任何位置。
Here's what I did:
jsoncpp doesn't seem to install itself, so you'll have to manually copy the library and header files wherever you want them when you're building applications that use the library.
现在使用 cmake 很容易做到:
确保安装了 CMake,然后在主存储库中运行以下命令:
It is now pretty easy to do using cmake:
Make sure CMake is installed and than in the main repo run the following commands:
CMAKE 解决方案现在也已弃用。 此处提供了当前的构建解决方案,
对于新手,给出了一个简单的测试示例此处。
The CMAKE solution is also deprecated now. The current build solution is provided here
And for newbies, a simple test example is given here.
使用介子对我来说不起作用。使用
vcpkg
的推荐方法确实有效:来源
Using
meson
did not work for me. The recommended way of usingvcpkg
did work:source