【发布时间】:2021-04-23 16:16:41
【问题描述】:
我正在使用 Visual Studio 2019。我正在修改我找到的旧代码,但它有这个错误:
命名空间“System::IO”没有成员“Ports”
目标是创建一个插件,扩展名为 .dll,我已经有一个 C++/CLI 文件。代码:
#include "DisplaySteering.hpp"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#using <system.dll>
#include <string.h>
#include <tlhelp32.h>
#include <comdef.h>
#include <time.h>
using namespace System;
using namespace System::IO;
using namespace System::IO::Ports;
using namespace System::Runtime::InteropServices;
我知道我必须激活课程,但是如何激活?我看到了这个帖子namespace system has no member Drawing in c++ 但找不到端口选项(链接是 Visual Studio 2017,我有 2019)
这可能是一个非常初学者的问题,但找不到有效的答案。提前谢谢!
【问题讨论】:
标签: c++ port visual-studio-2019 system