c++ - 将 Libjson 7.6.1 转换为 Visual Studio 2012 时出错

标签 c++ visual-studio-2012

Libjson 的最新版本是 7.6.1,第 239 行的关闭标记存在一个已知问题。修复该问题后,当我尝试从 Visual Studio 2012 转换此项目时,会发生错误:

libjson.vcproj: A sub filter with name "Source Files" already exists.

有人有想法吗?

来自 .vcproj 文件:

ProjectType="Visual C++"
Version="9.00"
Name="statLibJson"
ProjectGUID="{153A6FE5-40A9-4C31-B0C2-1C68D2E37BEA}"
RootNamespace="statLibJson"
TargetFrameworkVersion="196613"

该项目的原始版本应为 Visual Studio 2008。

最佳答案

这个 Visual C 项目文件有很多问题。我已经解决并致力于 GitHub repository .请随意使用它并做出贡献。

除了这个文件的问题之外,更容易清除所有源代码引用,导入项目设置并将所有文件重新放在 VS 20112 项目上。此文件的问题是:

  • 有对与 VS 2012 不兼容的 VCWebServiceProxyGeneratorTool 的引用
  • 第 229-231 行的标记 File 没有结束标记
  • 文件过滤器损坏

    From 101be42472a4c2c553f8d6fa4aa36fc8230d05ef Mon Sep 17 00:00:00 2001
    From: Alexandre Rocha Lima e Marcondes <alexandre.marcondes@gmail.com>
    Date: Thu, 14 Nov 2013 20:52:48 -0300
    Subject: [PATCH] =?UTF-8?q?Fixes=20on=20the=20VOC=C3=8A=202008=20project=20f?=
    =?UTF-8?q?ile=20to=20enable=20VS=202012=20upgrade?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    ---
    libjson.vcproj | 10 +---------
    1 file changed, 1 insertion(+), 9 deletions(-)
    diff --git a/libjson.vcproj b/libjson.vcproj
    index 25d1549..84c50c8 100644
    --- a/libjson.vcproj
    +++ b/libjson.vcproj
    @@ -32,9 +32,6 @@
                   Name="VCXMLDataGeneratorTool"
               />
               <Tool
    -               Name="VCWebServiceProxyGeneratorTool"
    -           />
    -           <Tool
                   Name="VCMIDLTool"
               />
               <Tool
    @@ -93,9 +90,6 @@
                   Name="VCXMLDataGeneratorTool"
               />
               <Tool
    -               Name="VCWebServiceProxyGeneratorTool"
    -           />
    -           <Tool
                   Name="VCMIDLTool"
               />
               <Tool
    @@ -154,9 +148,6 @@
                   Name="VCXMLDataGeneratorTool"
               />
               <Tool
    -               Name="VCWebServiceProxyGeneratorTool"
    -           />
    -           <Tool
                   Name="VCMIDLTool"
               />
               <Tool
    @@ -238,6 +229,7 @@
               <File
                   RelativePath=".\Source\JSONNode_Mutex.cpp"
                   >
    +           </File>
               <File
                   RelativePath=".\Source\JSONPreparse.cpp"
                   >
    -- 
    1.7.11.1
    

关于c++ - 将 Libjson 7.6.1 转换为 Visual Studio 2012 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18969037/

相关文章:

c++ - 指向数据成员的指针数组

visual-studio - Azure SDK 2.0 升级按钮不可用

visual-studio-2010 - 如何在 Visual Studio 2012 中设置断点的背景颜色?

c++ - std::unique_ptr 中的不可复制删除器

c++ - 为什么我们不应该对 gsl::not_null 使用指针运算?

android - Qt Creator Android 错误 "Platform SDK installed"

c++ - 如何提取二维矩阵C++同一条对角线上的单元格索引

c++ - 异常抛出 : Access violation reading location in VS 2012.(在 VS2010 中没有)

visual-studio-2012 - 从几个子目录导入 LESS in LESS

c++ - 在 Visual Studio 中快速插入 include guard 的方法