LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   integrating backend code with GUI (https://www.linuxquestions.org/questions/linux-newbie-8/integrating-backend-code-with-gui-860685/)

nishitmukesh 02-04-2011 08:15 AM

integrating backend code with GUI
 
i want to integrate backend (C code) with GUI (its based on java and php), im working on linux cent os, any idea how do i need to start with im new to this field
thanks..

TB0ne 02-04-2011 09:42 AM

Quote:

Originally Posted by nishitmukesh (Post 4248253)
i want to integrate backend (C code) with GUI (its based on java and php), im working on linux cent os, any idea how do i need to start with im new to this field
thanks..

New to what field? Linux or programming?

Can't really tell you how to make two unspecified, unknown programs work together, but if you've got a working program you can call from the command line, both PHP and Java have methods to call system programs.

nishitmukesh 02-07-2011 12:23 AM

Quote:

Originally Posted by TB0ne (Post 4248349)
New to what field? Linux or programming?

Can't really tell you how to make two unspecified, unknown programs work together, but if you've got a working program you can call from the command line, both PHP and Java have methods to call system programs.

new to both linux n programming

TB0ne 02-07-2011 09:27 AM

Quote:

Originally Posted by nishitmukesh (Post 4250490)
new to both linux n programming

Ok. If you've got a working C program, then all you've got to do is call that program like you would any other, from your Java or PHP code. Making system calls is well documented for both languages.

nishitmukesh 02-09-2011 11:20 PM

but its not working with system call

nishitmukesh 02-09-2011 11:31 PM

we are making the system call something like this...
system(cli_main(url,policy),$returnoutput);

>>>"cli_main" is the c function in Cclass.c.
it takes 2 arguments as "url" and "policy".I am making this call from my php program.
>>> Is this the correct way to do it.

TB0ne 02-10-2011 02:12 PM

Quote:

Originally Posted by nishitmukesh (Post 4253734)
we are making the system call something like this...
system(cli_main(url,policy),$returnoutput);

>>>"cli_main" is the c function in Cclass.c.
it takes 2 arguments as "url" and "policy".I am making this call from my php program.
>>> Is this the correct way to do it.

No, why would it be? You don't call a routine from any other program directly...you call the program itself, and pass whatever arguments it needs on the command line. Again, if you have a working C program, compile it, and get it working first. If your program is "Cclass", and takes two arguments, then you'd call it with
Code:

"system("Cclass $url $policy", $returnoutput)"
Read the documentation on these calls. http://php.net/manual/en/function.system.php


All times are GMT -5. The time now is 01:50 AM.