   Multiple Programming Languages
  Hello all,I was wondering how you can build a program that is being programmed with multiple languages.For example, my main function is written in C++, the first "hello world" message is written in Java, doing some database operations is done in stackless python, etc.How is this done? Is it a linker that links all compiled pieces of source-code together? Anyone ever done this?Regards,Xeile   
  Well you can integrate C and Java together using JNI.Dave   ;  it depends a bit on the languages you use.you can run c++ code from a java program through the JNI (if you need to access the hardware for some reason).python can access c++ function easily like this:c++char const* greet(){   return "hello, world";}can be exposed to Python by writing a Boost.Python wrapper:#include <boost/python.hpp>using namespace boost::python;BOOST_PYTHON_MODULE(hello){    def("greet", greet);}and then used from python like this:import helloprint hello.greet()running python scripts from within c++ is ofcourse very easy aswell. you could simply use SWIG , http://www.swig.org/   ;  oh, and you might want to check out the python C API reference manual.http://docs.python.org/api/api.html;  The .NET Framework allows you to do exactly this, so long as all your chosen languages have a .NET implementation.  You can also use the P/Invoke interoperability features of the CLI to call into native DLL's, but it's not a simple matter of adding a file to your project.   ;  Pretty much the most reliable, most portable and also most-intuitive way for doing something like this while providing support for most programming languages, is to make use of sockets in order to implement a network based IPC service, that way each component can expose its functionality via a generic (network) interface that can be used by other components, regardless of the programming language used. That way, you avoid having to link binaries together, or using mechanisms like JNI that may only be useful for certain situations. Using this approach will not only ensure portability, but also optional support for eventual concurrency.There are also standards like CORBA which are also supported by the absolute majority of mainstream programming languages (C++, C, Java, Ada, Python, Perl etc.). That is, you can basically program your components in arbitrary programming languages, as long as you expose the required functionality of each component via an CORBA interface. There are usually various CORBA implementations available for most programming languages, if you are working with C++, you'll probably want to check out ACE/TAO as well as omniORB.If you don't need to support that many different programming languages, you may also want to look for more lightweight CORBA-oriented implementations that may turn out to be more efficient, too-(i.e. COID).HTH   