emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* C++ code block not linked
@ 2017-11-25 14:59 Roger Mason
  2017-11-25 15:38 ` Thierry Banel
  0 siblings, 1 reply; 9+ messages in thread
From: Roger Mason @ 2017-11-25 14:59 UTC (permalink / raw)
  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 <iostream>
#include <ginac/ginac.h>
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<char, std::char_traits<char>, std::allocator<char> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-29 15:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 14:59 C++ code block not linked Roger Mason
2017-11-25 15:38 ` Thierry Banel
2017-11-26 11:42   ` Roger Mason
2017-11-27  7:33     ` Thierry Banel
2017-11-27 11:04       ` Roger Mason
2017-11-28 17:08         ` C++ code block not linked [SOLVED] Roger Mason
2017-11-28 17:27           ` Thierry Banel
2017-11-28 21:07             ` Nick Dokos
2017-11-29 15:38               ` Roger Mason

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).