From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Mason Subject: C++ code block not linked Date: Sat, 25 Nov 2017 11:29:06 -0330 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIbvF-0001Y1-Mi for emacs-orgmode@gnu.org; Sat, 25 Nov 2017 09:59:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIbvC-0005rH-Lg for emacs-orgmode@gnu.org; Sat, 25 Nov 2017 09:59:13 -0500 Received: from simone.ucs.mun.ca ([134.153.232.76]:53754) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eIbvC-0005nv-Cf for emacs-orgmode@gnu.org; Sat, 25 Nov 2017 09:59:10 -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 vAPEx6rC027454 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 25 Nov 2017 11:29:07 -0330 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: Org-Mode Hello, 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&)' Org mode version 9.0.3 (release_9.0.3-170-gfed1cf @ /home/rmason/.emacs.d/org-git/org-mode/lisp/) GNU Emacs 25.3.1 (i386-portbld-freebsd10.3, GTK+ Version 3.22.15) of 2017-11-22 Thanks for any help. Roger