문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top