I am looking for a compact C / C ++ compiler; any recommendations?

To meet the requirements of some commercial applications, we need very compact C / C ++, which should be:

  • Small size, the smaller, the better, the greener (ideally, the compiler should not require the installation process to work).

  • It can be compiled for both x86 and x86-64 programs designed for Windows and Linux platforms.

  • The compiler will only be used to compile very short C / C ++ programs (for example, no more than 20 lines), but the compilation time should be as short as possible (this is a critical requirement.)

  • All its functions must be enabled for input on the command line (well, probably, every compiler can do this).

  • They have easily accessible configuration files.

  • Can accept Boost and popular math libraries.

  • I do not need the advanced features of C ++ (e.g. C ++ / 99).

  • From the point of view of code optimization, if the compiler can optimize the code, this is a plus, but it is not necessary.

  • Ideally, this is best if it is free to redistribute, but the vocabulary fee is acceptable, but we prefer the payment method once and for all, rather than the method for each item / copy.

    / li>

We get our own product, but are open to other options, free or not. Thank you very much in advance.

+4
source share
2 answers

The Tiny C Compiler (TCC) is a very small and fast compiler. But only C, not C ++. Size is about 300 KB.

Digital Mars Compiler C / C ++ - C and C ++, also supports STL with extended package. The size is about 3 MB.

+12
source

There are several absolute requirements here, in particular 2. One of them limits you to GCC, LLVM and ICC. Given other requirements, I would advise LLVM.

(The latest Digital Mars dmc-oriented processor is the Pentium Pro, which is obviously not 64 bit.)

+1
source

All Articles