C++文件中的$include,以及代码中的其他$值
$include in a C++ file, and other $ values in the code
我最近收到了大量遗留C++代码,我想将其转移到最新的VS2012编译器或GCC编译器中。
然而,当我查看一些文件时,我可以看到一些以$符号为前缀的代码
例如,我有一些包含行:
#include "utlString.h"
$include "gclFloat_c.h"
和枚举声明:
$enum gclEFormatType
{
StandardFormat = 0, // e.g. 192784.272674700000000000
ScientificFormat = 1, // e.g. 1.927842726747E5 (includes exponent)
ExtendedFormat = 2 // e.g. 1.927842726747E5S30 (includes exponent and significant digit count)
};
我还有一些其他声明:
$cointerface [dual] gclIFloat : IDispatch
{
...
}
$coclass [STA] gclCFloat;
我认为它们可能是预处理器宏,但我不确定。有人能告诉我有什么吗?它们是如何使用的?
感谢
有三种可能性:
- 代码在被提供给编译器之前通过一些外部预处理器运行
- 它是编译器特定的扩展(请查看编译器的文档);或
- 这是一个语法错误
看起来这些文件是用来为c++和脚本包装器(如swig)生成包含文件的,但[dual]和[sta]让我认为它的目标是将c#作为第二语言。
很可能是Visual Studio的nmake语法。
你可以在互联网上找到很多关于这方面的教程,美元符号也被用作具有Visual Studio特定语法的令牌的标识符(在nmake之外)。
相关文章:
- 与其他编译器相比,相同的代码在工作室Microsoft提供不同的输出
- 我如何在一个 if 语句中声明所有数字我尝试通过其他方式声明所有数字,如果一个接一个,但似乎代码有逻辑错误
- 如何调试visual studio 2017生成的C++代码.android中的SO文件和其他第三方库
- 使用其他编译器编译QT代码
- 如何将char数组声明为函数参数?或告诉我此代码中还有其他问题?
- 在代码的其他部分中对lock_gard和不使用相同的互斥锁是否安全?
- 休眠函数,但不阻止其他函数和代码
- 如何使用所有其他文件信息来编译代码,例如HAAR级联训练的权重的XML文件
- 我应该担心动态代码生成与用C++编写的其他模块不匹配吗?
- 如何与其他开发人员共享代码?(和命名)
- 我的代码只会运行主函数,其他函数不会在C++中编译
- 相同的代码,不同的结果?从其他项目包含有什么问题?
- C - 如果语句问题.代码将不会运行其他,否则
- 来自文本字符串或某种其他机制的代码类自动生成器
- 在C 代码中查找其他悬挂
- 有人可以向我解释一下这段代码是如何工作的吗?(程序在预期数值且用户输入其他输入时再次要求用户输入)
- 将 c++ 代码中的当前用户环境变量设置为对其他进程(如 cmds)可见
- 为什么这C++代码使用某些编译器编译,而不能使用其他编译器编译?
- C++基础知识(使用其他方法(Unicode?)的相同代码)
- 如何在VS 2017中编译来自其他编译器的代码