Frage

Can a library written in one programming language be linked with a program written in some other language? Is object code from two different programming languages that do the exact same thing (e.g add two numbers and divide by another) have the same object code?

War es hilfreich?

Lösung

It depends on the languages, platform, and compilers used: sometimes yes, sometimes no. At one extreme, it's traditionally been very easy, for example, to use FORTRAN libraries from C. At the other end, languages with complicated runtime systems (VMs like Java, or scripting languages like Python or Ruby) usually need some special intermediate "glue" code to make things work, but even in those cases, it's usually achievable.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top