开发者

what compiler supports multi programming language?

i know it sounds crazy but, i just want to ask if is a compiler support multi 开发者_高级运维programming language? like Delphi could also support C/C++/C# etc? if there is, please let me know. or how?


The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada

http://gcc.gnu.org/


С++ Builder's projects can have both C++ and Pascal (Delphi) code in the same project. Just add existing or create a new .pas-file to C++ project. It will be compiled by C++ Builder (like it was C++ code).

The opposite is not true: Delphi can not compile C++ code.


Clang does C, C++ and Objective C.


Borland Rad Studio 2007 does C#, Delphi.NET, C++ (and with that also the C subset) and Delphi.

In later iterations, .NET support was abandoned.

But note that, like afaik GCC, these are in fact separate compiler binaries, with a common frontend that executes them.


.net support multi-language programming (vc++, c#, vb, etc.)


GCC can be considered as unique compiler even though indeed it's made of several binaries... but you can call it always as gcc and supports C, C++, Objective-C and few more (a lot more indeed, theoretically: one language per available front-end). At the beginning gcc meant GNU C Compiler, but then started to support more languages and the acronym became GNU Compiler Collection.


LLVM is a new compiler toolset, with similar goals to GCC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜