I've started on Learn C The Hard Way and want to collect my work in org mode. Executing
rm ex1 && CFLAGS="-Wall" make ex1
in the terminal returns
cc -Wall ex1.c -o ex1
ex1.c: In function ‘main’:
ex1.c:3:3: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
puts("Hello world.");
^~~~
but executing the source block
+BEGIN_SRC sh :results output :dir lcthw/
rm ex1 && CFLAGS="-Wall" make ex1
+END_SRC
renders
+RESULTS:
: cc -Wall ex1.c -o ex1
without the warnings.
Anyway I can include the warnings in the results of the source block? It is very relevant for working with C.
Feel like I have tried most (all?) results flags without success. Also looked into this question, but it specifies as python specific, so not sure if it should work.