compile a stream of data in C? -



compile a stream of data in C? -

is possible compile stream of info rather compiling .c file using gcc? example, possible instead of having code stored in xyz.c file, can straight compile code?

use gcc options -x , -

$ echo -e '#include <stdio.h>\nmain(){puts("hello world");return 0;}' | gcc -xc -ogarbage - && ./garbage && rm garbage hello world

the single line command above made of next parts:

echo -e '#include <stdio.h>\nmain(){puts("hello world");return 0;}' # "source" | # pipe gcc -xc -ogarbage - # compile && # , ./garbage # run && # , rm garbage # delete

c stream compilation

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -