Hi Robert Those #includes were a proposal I did long ago. The purpose was to make short scripts even shorter with default #includes that everybody uses.
Your use-case is worth considering. If this cause trouble, it is easy to remove the includes. To keep existing scripts working, an :includes parameter would be required, like this: #+BEGIN_SRC C++ :includes <string.h> <stdio.h><stdlib.h> // C++ script #+END_SRC Does everyone agree with this change? Regards Thierry Le 25/03/2015 03:28, Robert Snapp a écrit : > I must admit I am not a fan of the proposed changes to ob-C.el which seem to > insert > > #include <string.h> > #include <stdio.h> > #include <stdlib.h> > > during a tangle operation, without option. Currently, I am using C mode to > tangle source written in GLSL (OpenGL shading language), which is > syntactically similar to C. However the inclusion of the three includes > triggers an error when the tangled GLSL files are compiled by OpenGL. I would > appreciate if you either required users to specify each included header file > in the #+src_begin line, or provide an option to suppress the three include > statements described above. Alternatively, one could tangle GLSL files with > the extensions (.glsl, .vert, and .frag) like C files without inserting any > unrequested "#include" statements. > > Thank you for your consideration. > Robert Snapp > >