From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Problem compiling C++ in Org-mode Date: Fri, 18 Nov 2011 23:57:05 +0100 Message-ID: <80k46x82f2.fsf@somewhere.org> References: <1321592202.64015.YahooMailNeo@web161913.mail.bf1.yahoo.com> <87wraxanis.fsf@avasys.jp> <1321605584.56574.YahooMailNeo@web161909.mail.bf1.yahoo.com> <1321646363.68187.YahooMailNeo@web161909.mail.bf1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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=C2=A0 to a temporary file in /tmp/...) and was unable to f= ind an > include file in the current working directory: > > (setq org-babel-C++-compiler > =C2=A0=C2=A0=C2=A0 (concat "g++ -std=3Dc++0x " > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "-I" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (expan= d-file-name ".") > =C2=A0=C2=A0=C2=A0 ) > ) Your previous version contained "-I~/...". I don't know why you changed it, but this could eventually enlighten you: =E2=94=8F=E2=94=81=E2=94=81=E2=94=81=E2=94=81[ from Cygwin's ML] =E2=94=83 "If a word begins with an unquoted tilde character (`~'), all= of the =E2=94=83 characters up to the first unquoted slash (or all characters,= if there =E2=94=83 is no unquoted slash) are considered a TILDE-PREFIX." =E2=94=83 =E2=94=83 Note "word begins". I've been bitten by this in a makefile: =E2=94=83 =E2=94=83 OPENSSL_DIR :=3D ~/lib/openssl =E2=94=83 CPPFLAGS :=3D -I$(OPENSSL_DIR) =E2=94=83 =E2=94=83 The gcc command line then contained -I~/lib/openssl, and the = ~ was not =E2=94=83 expanded by the shell. ${HOME}/lib/openssl would have worked. =E2=94=97=E2=94=81=E2=94=81=E2=94=81=E2=94=81 Best regards, Seb --=20 Sebastien Vauban