Is it possible, for instance, to use functions of a C++ library in another language like Java or Ruby? Can a single application be programmed using separated languages? How?
2 Answers
Yes, it is quite possible to create a program that uses multiple languages. Here is a post for using C++ from Ruby. As for Java, you'll want to look at the Java Native Interface.
A program can be coded using different languages either by inline code (e.g., Assembly language in a C/C++ program, or MATLAB code inside of LabVIEW blocks). Or, by calling external library code (e.g., C# interoperability with C/C++ libraries).
Hope that's helpful!
Yes, it is possible to embed C/C++ code in another language. For example, take a look at SWIG:
SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of target languages including common scripting languages such as Perl, PHP, Python, Tcl and Ruby.

- 4,547
- 35
- 47