Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a native library? What is the need for binding?

Tags:

.net

What is native library? What is binding? Why it is needed?

like image 665
Jahid57 Avatar asked Sep 16 '10 08:09

Jahid57


People also ask

What is native library?

A native library is a library that contains "native" code. That is, code that has been compiled for a specific hardware architecture or operating system such as x86 or windows. Including such native library in your project may break the platform-independence of you application.

What is native binding?

A native service binding gives the details necessary to access an IBM® i service program directly. Open the EGL Deployment Descriptor editor by double-clicking an EGL deployment descriptor. For details about creating the file, see “Creating an EGL deployment descriptor.” Click Service Bindings.

What is a binding in code?

In programming and software design, binding is an application programming interface (API) that provides glue code specifically made to allow a programming language to use a foreign library or operating system service (one that is not native to that language).


1 Answers

A native library is a library written in a language that compiles down to native code for the platform it runs on, i.e. C++ creating PE files with x86 code. A binding, or language binding is the "glue" that makes it possible / more comfortable to use such a library from within another programming language, possibly providing a more elegant interface than just calling directly into the native code (think: better than P/Invoke, for example).

The question as to why it is needed is a simple one: To use the very large number of already existing libraries.

like image 98
Jim Brissom Avatar answered Oct 18 '22 02:10

Jim Brissom