[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Problem compiling C++ in Org-mode
From: |
Sebastien Vauban |
Subject: |
Re: [O] Problem compiling C++ in Org-mode |
Date: |
Fri, 18 Nov 2011 23:57:05 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (windows-nt) |
Hi Michael,
Michael Hannon wrote:
> Just for the record, adding the following to my .emacs file seems to solve
> the problem I was having, where the C++ compiler was compiling a source
> block (written to a temporary file in /tmp/...) and was unable to find an
> include file in the current working directory:
>
> (setq org-babel-C++-compiler
> (concat "g++ -std=c++0x "
> "-I"
> (expand-file-name ".")
> )
> )
Your previous version contained "-I~/...". I don't know why you changed it,
but this could eventually enlighten you:
┏━━━━[ from Cygwin's ML]
┃ "If a word begins with an unquoted tilde character (`~'), all of the
┃ characters up to the first unquoted slash (or all characters, if there
┃ is no unquoted slash) are considered a TILDE-PREFIX."
┃
┃ Note "word begins". I've been bitten by this in a makefile:
┃
┃ OPENSSL_DIR := ~/lib/openssl
┃ CPPFLAGS := -I$(OPENSSL_DIR)
┃
┃ The gcc command line then contained -I~/lib/openssl, and the ~ was not
┃ expanded by the shell. ${HOME}/lib/openssl would have worked.
┗━━━━
Best regards,
Seb
--
Sebastien Vauban