Michael Hannon <jm_han...@yahoo.com> writes: > Greetings. I'm having a problem compiling a C++ source-code block in > Org-mode. The same C++ code compiles and runs in the shell. > > The issue seems to relate to local include files. [...snip...] > What am I missing?
> /tmp/babel-245846_d/C-src-24584NIQ.cpp:7:26: fatal error: OtherStuff.cpp: No > such file or directory > compilation terminated. > /bin/bash: /tmp/babel-245846_d/C-bin-24584aSW: Permission denied Compilation is taking place in a temporary directory, miles away from where your org file lives. > ########## Org-mode compile uses same option as shell compile: > > org-babel-C++-compiler is a variable defined in `ob-C.el'. > Its value is "g++ -std=c++0x" The current directory is not specified in the include path. You would need to add a -I option to set the (absolute path to the) directory the org file is in. If you have all your org files in ~/org, you could try "g++ -std=c++0x -I~/org". Hope this helps, -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION FSF Associate Member #1962 Help support software freedom http://www.fsf.org/jf?referrer=1962