什么是语言绑定? [英] What is a language binding?

查看:104
本文介绍了什么是语言绑定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的好朋友Wikipedia,对这个问题的回答不是很好 .所以:

My good friend, Wikipedia, didn't give me a very good response to that question. So:

  • 什么是语言绑定?
  • 它们如何工作?

专门从用语言Y编写的库中用语言X编写的代码访问函数.

Specifically accessing functions from code written in language X of a library written in language Y.

推荐答案

假设您创建了一个C库,用于将内容发布到stackoverflow.现在,您希望能够使用Python中的相同库.在这种情况下,您将为您的库编写Python绑定.

Let's say you create a C library to post stuff to stackoverflow. Now you want to be able to use the same library from Python. In this case, you will write Python bindings for your library.

另请参见SWIG: http://www.swig.org

这篇关于什么是语言绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆