emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roger Mason <rmason@mun.ca>
To: emacs-orgmode@gnu.org
Subject: Re: C++ code block not linked
Date: Sun, 26 Nov 2017 08:12:27 -0330	[thread overview]
Message-ID: <y65k1yd1d24.fsf@mun.ca> (raw)
In-Reply-To: <5A198E84.5070305@free.fr> (Thierry Banel's message of "Sat, 25 Nov 2017 16:38:44 +0100")

Hello,

Thierry Banel <tbanelwebmin@free.fr> 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 <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&)'
>>
>
> 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

  reply	other threads:[~2017-11-26 11:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y65k1yd1d24.fsf@mun.ca \
    --to=rmason@mun.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).