c++ - 在 .NET 应用程序中包含 NOT .NET cpp 和 h

标签 c++ .net visual-studio visual-c++

编者注:问题似乎是在问:

Can I write non-managed ("regular") C++ code and then use it in a managed (".NET") application?

原题正文:

Sorry for the stupid question, but... Can I create cpp and h files with the NOT .NET functions and after that use these functions in .NET application (I need to use h and cpp files that use opencv in .NET application)? Sorry for my english

最佳答案

将源代码编译为 dll,然后从您的 .net 项目中引用它。

关于c++ - 在 .NET 应用程序中包含 NOT .NET cpp 和 h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18007157/

相关文章:

c++ - QAxObject 没有为 COM 对象创建槽信号

c# - 试图在字符串中查找单词但获取枚举没有结果

c# - 如何从每个 UdpClient 的特定远程客户端接收 UDP 数据包? (.Net 4.6)

visual-studio - 热重载在 Visual Studio 2022 中不起作用 - C#(未发现代码更改)

c# - 如何向 Visual Studio 2017 添加功能?

c++ - 未声明的复制构造函数是否自动内联?

c++ - 如何访问/修改 OpenCV 中的矩阵元素?为什么 at() 被模板化?

c# - 读写name值文本文件的简单方法

visual-studio - Visual Studio : How to break on handled exceptions?

c++ - 避免在必须增加维度时重新分配 vector