An implementation idea requied in Compiler Interface

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2007
Posts: 13
Reputation: abhi_marichi is an unknown quantity at this point 
Solved Threads: 0
abhi_marichi abhi_marichi is offline Offline
Newbie Poster

An implementation idea requied in Compiler Interface

 
0
  #1
Jan 10th, 2009
I want to know how can we interface compilers so that we can mix up many languages together but still the code should work.
One of my thoughts is, if there is any code in C allthose codes must be taken apart and must be compiled by C compiler and if there is any code in Java it must be taken apart and must be compiled separately. The laguages must be able to pass the result between them and output screen must be same for all.
So code like this must work:
[code]
#include<stdio.h>
void main()
{
system.out.println("HAI");
}
[\code]

It looks crazy but if possible answer it...
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: An implementation idea requied in Compiler Interface

 
0
  #2
Jan 10th, 2009
Whilst you can create programs from multiple programming languages, the "interface" tends to be at the DLL or program executable level.

You're not going to be able to mix/match several languages in the same source file.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 13
Reputation: abhi_marichi is an unknown quantity at this point 
Solved Threads: 0
abhi_marichi abhi_marichi is offline Offline
Newbie Poster

Re: An implementation idea requied in Compiler Interface

 
0
  #3
Jan 10th, 2009
Can anybody tell which language could be useful for this interfacing DLL or executables
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,973
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 286
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: An implementation idea requied in Compiler Interface

 
0
  #4
Jan 10th, 2009
I don't know if it's any help but it won't hurt :
http://www.amazon.com/Expert-NET-2-0...d=L6872TYA346B
Most compilers under Visual Studio compile to this intermediate language, be it Java, C++, C or C# or other.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: An implementation idea requied in Compiler Interface

 
0
  #5
Jan 13th, 2009
If you really want to, you could write C libraries that mimic java code, as well as many other languages. It would work best in C++ however, which provides a lot of functionality for class-based designs. Most important here, i would think, is operator overloading.
Last edited by death_oclock; Jan 13th, 2009 at 8:22 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC