I am thinking in the possibility of extending a C++ program calling a scripting languages. I have been searching and reading SWIG documentation, but all the examples speaks only about calling C++ libraries from scripting language, but not in the other way. Is possible with SWIG calling to PHP, or Java from C++ program? If it's not possible, what could better, boost.python or LUA?
            Asked
            
        
        
            Active
            
        
            Viewed 176 times
        
    0
            
            
        - 
                    1google 'embedding' rather than 'extending' for whatever scripting langauges you are interested in (SWIG is for 'extending') – bph Nov 02 '12 at 08:52
- 
                    http://stackoverflow.com/questions/9040669/how-can-i-implement-a-c-class-in-python-to-be-called-by-c is looking at the same problem with Python. – Flexo Nov 03 '12 at 08:35
- 
                    It is pretty easy to embed an interpreter in C++ for perl python lua [scripting language here] – daniel gratzer Nov 03 '12 at 08:38
1 Answers
0
            
            
        its not c++ but it should work
char *argsa[] = {"/bin/bash","-c","script",(char *) 0 };
int execReturn = execv("/bin/bash",argsa);
 
    
    
        gda2004
        
- 718
- 13
- 32
 
    