LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2011, 08:15 AM   #1
nishitmukesh
Member
 
Registered: Oct 2010
Posts: 39

Rep: Reputation: 0
Smile 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..

Last edited by nishitmukesh; 02-04-2011 at 08:30 AM.
 
Old 02-04-2011, 09:42 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by nishitmukesh View Post
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.
 
Old 02-07-2011, 12:23 AM   #3
nishitmukesh
Member
 
Registered: Oct 2010
Posts: 39

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
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
 
Old 02-07-2011, 09:27 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by nishitmukesh View Post
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.
 
Old 02-09-2011, 11:20 PM   #5
nishitmukesh
Member
 
Registered: Oct 2010
Posts: 39

Original Poster
Rep: Reputation: 0
but its not working with system call
 
Old 02-09-2011, 11:31 PM   #6
nishitmukesh
Member
 
Registered: Oct 2010
Posts: 39

Original Poster
Rep: Reputation: 0
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.
 
Old 02-10-2011, 02:12 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by nishitmukesh View Post
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
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
separating GUI from code Four Programming 2 08-10-2008 09:16 PM
Turn KnoppMyth backend/frontend into backend only nebbus Linux - General 0 09-09-2007 01:57 AM
Glade GUI :: Cancel Button Code nomb Programming 1 03-15-2007 08:06 AM
how to code borderless window gui war2004 Programming 0 01-29-2007 10:07 AM
Connection Between GUI and underlying code Centinul Programming 9 05-04-2006 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration