【问题标题】:Compilation error when compiling pro*C file with include files not recognizing, even after specifying the ProjectDir (Visual Studio 2012)即使在指定 ProjectDir (Visual Studio 2012) 后编译 pro*C 文件时包含文件无法识别,也会出现编译错误
【发布时间】:2014-11-14 03:08:03
【问题描述】:

我很难在 Visual Studio 2012 中编译 pro*c 文件。它在 VS 2008 中编译得很好。我没有更改任何更改。我看到的大多数问题是它无法识别本地头文件,该文件有一些定义,这导致了这个问题。

下面是编译错误的例子:

1>  Semantic error at line 107, column 21, file D:\GC\CoreMSVS2012\Velocity\Common\..\Server\sql\vendors.pc:
1>          int             lv_partner_id[PVU_LOAD_NUM];
1>  ....................1
1>  PCC-S-02322, found undefined identifier

其中 PVU_LOAD_NUM 是在包含在 vendor.pc 文件中的头文件中的常量定义为 #include "Vendors.h"。此标头与 .pc 文件位于同一位置。

【问题讨论】:

    标签: c++ visual-studio-2010 visual-studio-2012 proc


    【解决方案1】:

    找到答案...在互联网上搜索,但没有找到任何地方...甚至在他们的文档中也没有。

    解决方案: 每当您尝试包含环境变量(如 '$(VCInstallDir)')或 Visual Studio 变量(如 '$(ProjectDir)')时,您必须使用 sys_include,而不是普通的包含。正如文档中所说的包含标准系统库,我将这个逻辑用于环境变量而不是 Visual Studio 相关变量,这导致无法工作,因为它没有被评估。

    希望将来有人觉得它有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多