2

I am generating a C++ source towards android, with Swig 2.0, and I use . But addind either

%include <std_sstream.i>

or

%include <sstream.i>

give me the eror that this include file is not recognized.

What is the correct include then ?

My environment

Ubuntu 13.04 64 bits.

Gcc 4.7.3

Android NDK r8e

Thanks in advance

loloof64
  • 5,252
  • 12
  • 41
  • 78
  • 2
    Not all target languages have implemented suport for sstream. In a quick check of Swig 2.0.10 only Python and Ruby have a `std_sstream.i` implementation. – Mark Tolonen Jul 21 '13 at 17:12

1 Answers1

1

You might try %include <std/std_sstream.i> and see what happens (that is all the implementations of the Ruby and Python files do). If that doesn't work you could post the errors. Finally, you might consider whether you really want a string stream in your interface. It might be better to just pass a string through the interface?

Dan Macumber
  • 305
  • 1
  • 8
  • Thanks, I wanted sstream because strings concatenations are easiers with sstream. Unfortunately, your solution does not work : /usr/local/share/swig/2.0.10/std/std_sstream.i:13: Error: Unable to find 'std_alloc.i' /usr/local/share/swig/2.0.10/std/std_sstream.i:14: Error: Unable to find 'std_basic_string.i' /usr/local/share/swig/2.0.10/std/std_sstream.i:16: Error: Unable to find 'std_ios.i' /usr/local/share/swig/2.0.10/std/std_sstream.i:20: Error: Unable to find 'std_streambuf.i' /usr/local/share/swig/2.0.10/std/std_sstream.i:21: Error: Unable to find 'std_iostream.i' – loloof64 Jul 23 '13 at 12:50
  • Have you tried adding `%include ` first? You may also need to add things like `%include ` as needed. The std interface files provide definitions that are not language specific so they won't have fancy extras for your target language but they should work. – Dan Macumber Jul 23 '13 at 15:46
  • Thanks, I've tried to add them, but it seems that I must add more dependencies : for which I fail to give the correct path. – loloof64 Jul 23 '13 at 19:09