c# - Visual Studio 2008 中 C# 项目中的 C++ 项目引用

标签 c# c++ visual-studio

是否可以在 C# 项目中引用 C++ 项目?我尝试在 C# 项目中添加对那个 C++ 项目的引用,但我收到一条错误消息“无法添加对的引用”

最佳答案

您不能直接引用 native DLL。仅当您为 CLI(针对 .NET CLR)编译它或构建了一个 COM 组件(在这种情况下 VS 自动构建一个互操作 DLL)时,您才可以。否则没办法,您将不得不编写一个包装器 DLL。

关于c# - Visual Studio 2008 中 C# 项目中的 C++ 项目引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3169709/

相关文章:

python - 如何解决 "Error: [Win Error2] The system cannot find the file specified"

visual-studio - VisualStudio : translating a build version to a calendar date

c# - 从字符串中删除所有 "invisible"个字符?

c# - 在 Esc 键上关闭 Ajax Modal 弹出窗口

c++ - 如何推迟shared_ptr的删除操作?

c++ - C++中线程的使用

php - 程序无法启动,因为缺少 msvcr100.dll

C# RestSharp PUT 方法并发送原始字节 (protobuf)

c# - System.Security.SecurityException : The source was not found, 但无法搜索部分或所有事件日志。无法访问的日志:安全

C++通用指针?空指针?