Right now I have this
#include <zlib.h>
int main ()
{
puts (ZLIB_VERSION);
}
As an exercise, is there any way I could get it to compile on one line, something like
#include <zlib.h>; int main (){ puts (ZLIB_VERSION); }
I can get it to compile on two lines, but the include is preventing one line.
There’s no way to do exactly what you want. With that said, if this is part of a build system, it would be a lot better to use the
-Eoption to the compiler to preprocess a file containing simplyand then parse the output. This way you avoid running a program generated by the compiler, so your build doesn’t break when cross-compiling.