vc90上的jsoncpp?

发布于 2024-10-01 08:29:28 字数 858 浏览 16 评论 0原文

有人有 jsoncpp 在 vc90 上工作吗?

他们使用构建系统 Scons,我从未听说过。我安装了最新的 Scons,找到了一个未记录的 scons.bat,在我的 jsoncpp 目录中启动了 vc90 提示符,修改了 SConstruct 文件以支持 msvc90 目标(我从已经支持的 msvc80 平台复制了样板)运行 scons .bat platform=msvc90 并出现错误:

scons: done reading SConscript files.
scons: Building targets ...
cl /Fobuildscons\msvc90\src\jsontestrunner\main.obj /c src\jsontestrunner\main.c
pp -GR -EHsc /nologo /MT /nologo /Iinclude /I.
main.cpp
c:\projects\docwayhead\wspt_docway_plugins\contrib\jsoncpp-src-0.5.0\include\jso
n\value.h(5) : fatal error C1083: Cannot open include file: 'string': No such fi
le or directory
scons: *** [buildscons\msvc90\src\jsontestrunner\main.obj] Error 2
scons: building terminated because of errors.

我已经投入了太多精力来构建它,并且 jsoncpp 显然没有维护,所以我现在放弃。

anyone have jsoncpp working on vc90?

they use a build system, Scons, which I have never heard of. I installed the latest Scons, found an undocumented scons.bat, launched a vc90 prompt in my jsoncpp dir, modified the SConstruct file to support a msvc90 target (i copied the boilerplate from the msvc80 platform which was already supported) ran scons.bat platform=msvc90 and got errors:

scons: done reading SConscript files.
scons: Building targets ...
cl /Fobuildscons\msvc90\src\jsontestrunner\main.obj /c src\jsontestrunner\main.c
pp -GR -EHsc /nologo /MT /nologo /Iinclude /I.
main.cpp
c:\projects\docwayhead\wspt_docway_plugins\contrib\jsoncpp-src-0.5.0\include\jso
n\value.h(5) : fatal error C1083: Cannot open include file: 'string': No such fi
le or directory
scons: *** [buildscons\msvc90\src\jsontestrunner\main.obj] Error 2
scons: building terminated because of errors.

i've already put too much effort into getting this to build, and jsoncpp is clearly unmaintained, so i give up for now.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

风启觞 2024-10-08 08:29:28

无需使用 Scons。

/makefiles/vc71/ 下,您可以找到一个可以向上转换和构建的 Visual Studio 解决方案。

No need to use Scons.

Under the /makefiles/vc71/ you can find a visual studio solution which you can up convert and build.

々眼睛长脚气 2024-10-08 08:29:28

修改 msvc90 平台文件以确保在调用 cl 时使用 VC90 包含目录(显然在您提供的命令行中还不是这种情况)。

请注意,Scons 是使用 Python 编写的,它的配置文件也是如此,因此您周围了解 Python 的人可能能够有效地帮助您,即使他们对 scons 一无所知。

Modify the msvc90 platform file to make sure VC90 include directories are used when calling cl (clearly not yet the case in the provided command line you provided).

Note that Scons is written using Python and so are its configuration files, so people who know Python around you might be able to help you efficiently, even if they know nothing about scons.

漆黑的白昼 2024-10-08 08:29:28

你确定你的VS命令行工作正常吗?我只是通过以下方式让它工作:
- 在 allowed_values 中添加 msvc90 条目
- 稍后复制/粘贴 msvc80 部分并将其修改为使用 env['MSVS_VERSION'] = 9.0

我正在使用 scons 1.3.0。

Are you sure your VS command line is working properly? I got it to work just by:
- Adding a msvc90 entry in allowed_values
- copy/pasting the msvc80 section later and modifying it to use env['MSVS_VERSION'] = 9.0

I'm using scons 1.3.0.

眼角的笑意。 2024-10-08 08:29:28

jsoncpp 0.5.0 的 scons 设置不支持开箱即用的 VS 9.0 或 10.0。您需要首先将 msvc90 添加到 SConstruct 第 21 行的 allowed_values 中,然后在第 103 行添加此部分。

elif platform == 'msvc90':
    env['MSVS_VERSION']='9.0'
    for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
        env.Tool( tool )
    env['CXXFLAGS']='-GR -EHsc /nologo /MT'

只需将 9.0 替换为 10.0,将 90 替换为 100 即可获得 VS 10.0 支持。

The scons setup for jsoncpp 0.5.0 does not support VS 9.0 or 10.0 out of the box. You need to first add msvc90 to the allowed_values in the SConstruct line 21, and the to add this section on line 103.

elif platform == 'msvc90':
    env['MSVS_VERSION']='9.0'
    for tool in ['msvc', 'msvs', 'mslink', 'masm', 'mslib']:
        env.Tool( tool )
    env['CXXFLAGS']='-GR -EHsc /nologo /MT'

Just replace 9.0 with 10.0 and 90 with 100 for VS 10.0 support.

挽心 2024-10-08 08:29:28

从 jsoncpp 0.6.0 版本开始,您可以通过使用新的 Amalgamated 版本避免很多麻烦。这只是两个 .h 文件和一个 .cpp 文件,您可以直接编译到项目中。到目前为止,它在 VS 9 中对我来说效果很好(并且通过一些 mods,我现在也可以使用 C++Builder 2010 来编译它 - 还没有真正测试结果)。

顺便说一句,我已经针对版本 0.6.0-rc2 提交了一个错误; json.h 合并版本中的一行需要更改宏名称。

As of version 0.6.0 of jsoncpp, you can avoid a lot of hassle by using the new Amalgamated version. This is just two .h files and one .cpp file that you compile directly into your projects. It's working great for me so far in VS 9 (and with a few mods I'm now able to compile it with C++Builder 2010 as well -- haven't really tested the result yet).

By the way, I've filed a bug against version 0.6.0-rc2; one line in the Amalgamated version of json.h needs to have a macro name changed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文