RSS Forums RSS

An implementation idea requied in Compiler Interface

Please support our C advertiser: Programming Forums
Reply
Posts: 9
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

  #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...
AddThis Social Bookmark Button
Reply With Quote  
Posts: 5,126
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: 633
Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: An implementation idea requied in Compiler Interface

  #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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
UK Voter? Please send a message to Incapability Brown and the rest of Zanu-Labour
Up to 8Mb PlusNet broadband from only £5.99 a month!
Reply With Quote  
Posts: 9
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

  #3  
Jan 10th, 2009
Can anybody tell which language could be useful for this interfacing DLL or executables
Reply With Quote  
Posts: 1,215
Reputation: ddanbe is just really nice ddanbe is just really nice ddanbe is just really nice ddanbe is just really nice 
Solved Threads: 163
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Nearly a Posting Virtuoso

Re: An implementation idea requied in Compiler Interface

  #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.
"If you judge people, you have no time to love them." Mother Teresa
Make love, no war. Cave ab homine unius libri.
First rule of debugging: "If you get a different error message, you're making progress."
Danny
Reply With Quote  
Posts: 349
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

  #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 7:22 pm.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the C Forum
Views: 415 | Replies: 4 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:13 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC