From: Eric Schulte <eric.schulte@gmx.com>
To: Daimrod <daimrod@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org Babel C/C++
Date: Mon, 26 Mar 2012 07:39:56 -0400 [thread overview]
Message-ID: <87wr67po1v.fsf@gmx.com> (raw)
In-Reply-To: 87fwcz6vbf.fsf@gmail.com
Applied, Thanks!
Daimrod <daimrod@gmail.com> writes:
> Hi,
>
> I've made a small patch to ob-C.el so it now includes the current
> directory to the list of directories to be searched for header files.
> Without this, I cannot include a local header file because the
> compilation happens in /tmp and thus gcc or g++ doesn't search for
> header files in the directory I currently work.
>
> diff --git a/lisp/ob-C.el b/lisp/ob-C.el
> index f1525aa..4f33fc4 100644
> --- a/lisp/ob-C.el
> +++ b/lisp/ob-C.el
> @@ -96,15 +96,14 @@ or `org-babel-execute:C++'."
> (progn
> (with-temp-file tmp-src-file (insert full-body))
> (org-babel-eval
> - (format "%s -o %s %s %s -I \"%s\""
> + (format "%s -o %s %s %s"
> (cond
> ((equal org-babel-c-variant 'c) org-babel-C-compiler)
> ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler))
> (org-babel-process-file-name tmp-bin-file)
> (mapconcat 'identity
> (if (listp flags) flags (list flags)) " ")
> - (org-babel-process-file-name tmp-src-file)
> - (file-name-directory (expand-file-name (buffer-file-name)))) ""))))
> + (org-babel-process-file-name tmp-src-file)) ""))))
> ((lambda (results)
> (org-babel-reassemble-table
> (if (member "vector" (cdr (assoc :result-params params)))
--
Eric Schulte
http://cs.unm.edu/~eschulte/
next prev parent reply other threads:[~2012-03-26 14:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 18:12 Org Babel C/C++ Daimrod
2012-03-26 11:39 ` Eric Schulte [this message]
2012-03-28 23:01 ` Daimrod
2012-03-29 1:34 ` Michael Hannon
2012-03-30 11:17 ` Daimrod
2012-03-31 15:47 ` URGENT " Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wr67po1v.fsf@gmx.com \
--to=eric.schulte@gmx.com \
--cc=daimrod@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.