Yes Will, there is a bug. I will look at it. In the meantime, as a workaround, you may move includes from header to body:
#+BEGIN_SRC C++ #include <cstdio> #include <iostream> using namespace std; int main() { printf("Hello "); cout << "world"; } #+END_SRC Thanks for reporting Thierry Le 03/09/2014 01:06, Will Everett a écrit : > Will Everett <will <at> spings.net> writes: >> I believe the :includes header argument is incorrectly parsing lists of > includes for c++. This snippet: >> #+BEGIN_SRC C++ :includes <cstdio> <iostream> >> using namespace std; >> printf("Hello "); >> cout << "world"; >> #+END_SRC >> >> produces a compiler error: >> >> warning: extra tokens at end of #include directive >> #include <cstdio> <iostream> >> >> Then, of course printf and cout are undeclared. It looks like the include > is just throwing all the includes onto one line when they should be broken > up and each put on their own line. > >