caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Reuben Rowe <R.N.S.Rowe@kent.ac.uk>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Error When Linking Against SDSL C++ Library
Date: Mon, 10 Jul 2017 17:45:55 +0100	[thread overview]
Message-ID: <f53f062a-8684-0fdd-49ba-6e9af629d2a8@kent.ac.uk> (raw)
In-Reply-To: <dfcae6e5-d8a3-bc2b-fe2a-eb57603aae5b@kent.ac.uk>

Hi,

I have solved this now - I did not include the CAML header files as 
extern "C".

Thanks,

Reuben


On 10/07/17 17:02, Reuben Rowe wrote:
> Hi,
>
> I am trying to link some OCaml code against the SDSL C++ library, but 
> I am getting a strange error.
>
> It seems that a reference in being generated to the caml_flush() 
> function, but in the standard namespace (index_interface.o is my 
> wrapper to expose the library to my OCaml code):
>
> ../index_interface.o: In function `sdsl::int_vector_buffer<(unsigned 
> char)8>::write_block()':
> /usr/local/include/sdsl/int_vector_buffer.hpp:89: undefined reference 
> to `std::ostream::caml_flush()'
> ../index_interface.o: In function `sdsl::int_vector_buffer<(unsigned 
> char)0>::write_block()':
> /usr/local/include/sdsl/int_vector_buffer.hpp:89: undefined reference 
> to `std::ostream::caml_flush()'
> collect2: error: ld returned 1 exit status
>
> I am guessing this is not where it should be looking for caml_flush!?
>
> The SDSL int_vector_buffer class on the line in question is just 
> calling the flush() method on an object with a type that inherits from 
> std::ostream.
>
> Does anyone have an idea of why this might be happening?
>
> Thanks,
>
> Reuben
>


      reply	other threads:[~2017-07-10 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 14:51 [Caml-list] DL 2017 - Call for Participation geoff
2017-07-10 16:02 ` [Caml-list] Error When Linking Against SDSL C++ Library Reuben Rowe
2017-07-10 16:45   ` Reuben Rowe [this message]

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

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

  git send-email \
    --in-reply-to=f53f062a-8684-0fdd-49ba-6e9af629d2a8@kent.ac.uk \
    --to=r.n.s.rowe@kent.ac.uk \
    --cc=caml-list@inria.fr \
    /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.
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 NNTP newsgroup(s).