Please consider the following self-contained, minimal example org
file:
#+name: zepto-c
#+CAPTION: A tiny C file
#+begin_src C++ :tangle zepto.c
#include "zepto.h"
void foo (void) {}
#+end_src
#+name: zepto-h
#+CAPTION: A tiny header file
#+begin_src C++ :tangle zepto.h
#include <stdio.h>
void foo (void);
#+end_src
On org-babel-tangle
, it produces the expected two files, zepto.c
and zepto.h
, but they contain wrappers with main
:
zepto.c:
int main() {
#include "zepto.h"
void foo (void) {}
return 0;
}
zepto.h:
int main() {
#include <stdio.h>
void foo (void);
return 0;
}
I just want org-babel to tangle out exactly what I wrote, with no modifications. I have tried many combinations of headers :eval
, :results
, :exports
, :tangle
, and :noweb
from the documentation, even trying verbatim
values for them in the hopes that some undocumented feature will give me the results I want, but no luck. The space of all possibile values for those headers is combinatorially large, so it could take me a long time to try them all. Perhaps someone knows the correct incantation?
I will be grateful for any advice.
:main no
? – mutbuerger Jun 11 '17 at 19:29