这是在VS 2012中创建的头文件中的C ++ / CLI代码,我们将假设它已在当时工作。
namespace CLIWrapper {
public ref class Wrapper
{
public:
static bool call_calculator(double* liquids, double* solids, double temperature, int arraySize);
static void build_calculator(char** components, char* parameterSet, int arraySize);
};
}
当我尝试使用VS 2017编译它时,我遇到了这些错误:
C2059语法错误:' public'
C2143语法错误:缺少';'之前' {'
C2447' {':缺少功能标题(旧式正式列表?)
有关导致这些或如何修复它们的任何想法?