From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Mason Subject: Re: C++ code block not linked Date: Sun, 26 Nov 2017 08:12:27 -0330 Message-ID: References: <5A198E84.5070305@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIvKY-0002wN-9C for emacs-orgmode@gnu.org; Sun, 26 Nov 2017 06:42:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIvKV-0002TJ-5h for emacs-orgmode@gnu.org; Sun, 26 Nov 2017 06:42:38 -0500 Received: from simone.ucs.mun.ca ([134.153.232.76]:50775) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eIvKU-0002Rx-TI for emacs-orgmode@gnu.org; Sun, 26 Nov 2017 06:42:35 -0500 Received: from pyrope.local.esd.mun.ca (CPE00fc8db7a323-CM00fc8db7a320.cpe.net.cable.rogers.com [99.249.98.173]) (authenticated bits=0) by simone.ucs.mun.ca (8.13.8/8.13.8) with ESMTP id vAQBgRgo012971 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sun, 26 Nov 2017 08:12:28 -0330 In-Reply-To: <5A198E84.5070305@free.fr> (Thierry Banel's message of "Sat, 25 Nov 2017 16:38:44 +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 Hello, Thierry Banel writes: > On 25/11/2017 15:59, Roger Mason wrote: >> This code compiles fine on command line but org-babel can't link it. >> >> #+BEGIN_SRC C++ :flags "-std=c++11 -I/usr/local/include" :libs "-L/usr/local/lib -lginac" >> #include >> #include >> using namespace std; >> using namespace GiNaC; >> >> int main () { >> symbol a("a"), b("b"), x("x"), y("y"); >> lst eqns, vars; >> eqns = a*x+b*y==3, x-y==b; >> vars = x, y; >> cout << lsolve(eqns, vars) << endl; >> // -> {x==(3+b^2)/(b+a),y==(3-b*a)/(b+a) >> >> return 0; >> } >> #+END_SRC >> >> The error buffer contains many lines like this: >> >> /tmp//ccv5YYn1.o: In function `main': >> C-src-1046xti.cpp:(.text+0x67): undefined reference to `GiNaC::symbol::symbol(std::__cxx11::basic_string, std::allocator > const&)' >> > > I get the correct result: > > #+RESULTS: > | {x==(3+b^2)*(a+b)^(-1) | y==-(-3+a*b)*(a+b)^(-1)} | > > I use Or mode version 9.1.1 I just upgraded to Org mode version 9.1.3 (release_9.1.3-185-g579fa1 @ /home/rmason/.emacs.d/org-git/lisp/) and I'm still getting the link error. Cheers, Roger