将 C++/CLI 转换为 C++ 时的陷阱
我有一个用 C++/CLI 编写的库,我想打开它。我希望它尽可能跨平台,并且能够编写绑定以供其他语言使用(Java、Python 等)。为此,该库需要采用纯 C++ 语言,以获得最大的灵活性。我认为逻辑结构已经存在,我只需要将它使用的 .NET 库替换为标准 C++ 库即可。这是一个错误的观念吗?进行这种转变时我应该注意什么?
I have a library written in C++/CLI and I want to open it up. I want it to be as cross-platform as possible and be able to write bindings to it for other languages to use (Java, Python, etc, etc). To do this, the library needs to be in plain C++ for maximum flexibility. I figure that the logical structures are already there, I just need to replace the .NET libraries it uses with the standard C++ ones. Is this a misguided notion? What should I watch out for when making this transition?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从未做过 C++/Cli 到 C++ 的移植,但我想到的是:
Never done a port of C++/Cli to C++, but this comes to my mind:
这可能比它的价值更麻烦。您可能会遇到以下情况:
It might be more trouble than it's worth. Here is what you might come across: