问题描述
所以就是这样。
我有一个c库。我需要在C#项目中使用几个函数
所以我想我需要创建一个C ++库来用作导出这些函数的包装器。然后在我的C#项目中添加此库作为参考。
问题是当我尝试使用来自另一台PC的库时,lib文件的路径无效更多,所以它给了我一个错误。
所以我如何移动C ++库,同时引用的lib文件总能正常工作
是否类似于C ++中的动态引用lib文件?
So here is the thing.
I have a c library. I need to use several functions from there in a C# project
So I was thinking I need to create a C++ library to be used as wrapper to export these functions. Then add this library as a reference in my C# project.
The problem is that when I try to use the library from another pc the path for lib files are not valid any more so it is giving me an error.
So how I can move C++ library and at the same time the lib files referenced there could always work
Is it something like dynamic referencing lib file in C++ ?
推荐答案
这篇关于如何将lib文件添加到C ++库,然后在c#项目中使用该库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!