what is the best compiler

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: May 2004
Posts: 1,478
Reputation: mikeandike22 is an unknown quantity at this point 
Solved Threads: 18
mikeandike22's Avatar
mikeandike22 mikeandike22 is offline Offline
Nearly a Posting Virtuoso

what is the best compiler

 
0
  #1
Oct 1st, 2004
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.
My Daniweb Blog: This,That, and Everything Else (Blog contest winner)

GetFirefox!
GetOpera!






Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,580
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 709
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: what is the best compiler

 
0
  #2
Oct 2nd, 2004
>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'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 1,478
Reputation: mikeandike22 is an unknown quantity at this point 
Solved Threads: 18
mikeandike22's Avatar
mikeandike22 mikeandike22 is offline Offline
Nearly a Posting Virtuoso

Re: what is the best compiler

 
0
  #3
Oct 2nd, 2004
ok thanks i will test it out. It would just be cool if there was some super compiler. It would save a lot of time if you have to program in different langs for diff things.
My Daniweb Blog: This,That, and Everything Else (Blog contest winner)

GetFirefox!
GetOpera!






Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,580
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 709
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: what is the best compiler

 
0
  #4
Oct 2nd, 2004
>It would just be cool if there was some super compiler.
Yes, it would. But the lexical analyzer would be a bitch to write.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 1,478
Reputation: mikeandike22 is an unknown quantity at this point 
Solved Threads: 18
mikeandike22's Avatar
mikeandike22 mikeandike22 is offline Offline
Nearly a Posting Virtuoso

Re: what is the best compiler

 
0
  #5
Oct 2nd, 2004
i guess but couldn't you just take like ten compilers and put em into one program.

and keep the language clean
My Daniweb Blog: This,That, and Everything Else (Blog contest winner)

GetFirefox!
GetOpera!






Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,580
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 709
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: what is the best compiler

 
0
  #6
Oct 3rd, 2004
>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:
$ sc -lang=C src.c
Compiling C code...

$ sc -lang=Pascal src.pas
Compiling Pascal code

$ sc -lang-Fortran90 src.f90
Compiling Fortran90 code
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.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,954
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 917
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: what is the best compiler

 
0
  #7
Oct 3rd, 2004
: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!

Download from:
http://www.rjpcomputing.com/programming/bcx/

I have used this package for a while now and have enjoyed its flexibility,tight code and executables.

Below is a example BCX code to load a bitmap into a window form. You can take a good look at the generated C code, which is of course much more complex. This should convince you.

' load a bitmap file to a form

GUI "Bitmap1"

DIM Form1 AS CONTROL
DIM Bitm1 AS CONTROL

SUB FORMLOAD
' create a form 310x250
Form1 = BCX_FORM ("Bitmap from file", 0, 0, 310, 250)
' load the bitmap, upper left corner x=1 y=1, auto size
Bitm1 = BCX_BITMAP("demo.bmp",Form1,1234,1,1,0,0)

CENTER(Form1) ' center on display screen
SHOW (Form1)
END SUB

BEGIN EVENTS
' use default stuff, exit etc.
END EVENTS
Reply With Quote Quick reply to this message  
Reply

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



Similar Threads
Other Threads in the Computer Science Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC