what is the best compiler out there that you can use for a variety of languages.
Like is their a compiler that can compile c++, the basics, java, etc.
I am just looking for a good compiler that is free and if possible can compile more than one prog. lang.
>what is the best compiler
What's the best pizza topping? Try again.
>what is the best compiler out there that you can use for a variety of languages. Like is their a compiler that can compile c++, the basics, java, etc.
Better. No such compiler exists. The closest you will get is a C++ compiler that can also handle C. Try again.
>I am just looking for a good compiler that is free and if possible can compile more than one prog. lang.
Now I know what you're looking for. Here is your best bet.
>i guess but couldn't you just take like ten compilers and put em into one program.
Yes, but you would have the same problem if this were some kind of smart supercompiler. The problem is figuring out which language is being used and then calling the proper internal program. The only way that this could be done without serious coding effort on the part of the compiler writer would be to use a compilation switch:
And so on. Anything else would introduce some form of common comment that specifies which compiler to call or requires the lexical analyzer to figure out from context what kind of language is being used. The former kills portability to other compilers and the latter would be a nightmare. The switch option is a good one, though the effort expended in developing this supercompiler wouldn't be worth the convenience gained by using a switch instead of a different compiler.
:o The best compiler may be a preprocessor that uses a set of macros and easy to understand code to write your program, then translates this to C/C++ code that one of those free C/C++ compiler can take to do the compiling and linking.
The closest thing to this is BCX, a fairly mature system that uses modified basic and allows inline asm and C code.
There is even a visual IDE. Best of all the whole package, BCX translator, PellesC, IDE, Editor, very good help file, a bunch of sample code and more can be had for free!