Re: [O] Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa at /home/will/.emacs.d/elpa/org-20140616/)]

2014-09-03 Thread Thierry Banel
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.





Re: [O] Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa at /home/will/.emacs.d/elpa/org-20140616/)]

2014-09-02 Thread Will Everett
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.


Sorry to be a pest, but did anyone see this? Does no one else try to use
org-babel for LP with C/C++?