From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: C++ code block not linked [SOLVED] Date: Tue, 28 Nov 2017 16:07:44 -0500 Message-ID: <87r2si3ye7.fsf@alphaville.usersys.redhat.com> References: <5A198E84.5070305@free.fr> <5A1BBFBC.2080203@free.fr> <5A1D9C99.80606@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJn6s-00021J-MB for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 16:08:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJn6o-0000hd-Kd for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 16:08:06 -0500 Received: from [195.159.176.226] (port=55856 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJn6o-0000gh-DF for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 16:08:02 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eJn6Y-0001I9-A9 for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 22:07:46 +0100 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@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Thierry Banel writes: > On 28/11/2017 18:08, Roger Mason wrote: > > Hello, > > Roger Mason writes: > > It compiles fine: > > c++ -std=c++11 -I/usr/local/include -L/usr/local/lib -lginac > C-src-1053hn1.cpp > > Solved by setting: > > (setq org-babel-C++-compiler "c++") > > I don't recall having had to do this before. > > Phew! Very glad to have this working again. I'm not aware of any other tool > that is as good as org-mode for literate programming and reproducible > research. A big thank you to those who created and maintain it. > > Cheers, > Roger > > Good to know it is solved. > You can customize this variable: >   C-h v org-babel-C++-compiler > > In case someone else bump into a similar problem, the actual command launched by Babel can be obtained > through the debugger: >   M-x debug-on-entry RET org-babel-eval RET >    evaluate the Babel block > The debugger shows a line like this one: >   * org-babel-eval("g++ -o /tmp/babel-3110Zeg/C-bin-3110Fwh -std=c++11 ... > This works for many languages supported by Babel. > All very good info, but why did the OP not have a g++? Using a non-linux operating system? Using a non-GNU tool chain? Inquiring minds want to know... -- Nick