943,828 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 652
  • C RSS
Jan 10th, 2009
0

An implementation idea requied in Compiler Interface

Expand Post »
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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abhi_marichi is offline Offline
18 posts
since Dec 2007
Jan 10th, 2009
0

Re: An implementation idea requied in Compiler Interface

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.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
Jan 10th, 2009
0

Re: An implementation idea requied in Compiler Interface

Can anybody tell which language could be useful for this interfacing DLL or executables
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abhi_marichi is offline Offline
18 posts
since Dec 2007
Jan 10th, 2009
0

Re: An implementation idea requied in Compiler Interface

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.
Reputation Points: 2035
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,738 posts
since Oct 2008
Jan 13th, 2009
0

Re: An implementation idea requied in Compiler Interface

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.
Reputation Points: 128
Solved Threads: 43
Posting Whiz
death_oclock is offline Offline
389 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: func return 2 values
Next Thread in C Forum Timeline: Help with grep





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC