Sorry, I'll try to be less terse next time :) Thank you for the prompt reply and the upstream bug report, I will investigate there and you are absolutely correct. I am not needing to use the -includeall switch after all.
Peace On Thu, 2013-11-28 at 00:19 +0100, Torsten Landschoff wrote: > Hi, > > This must be the least verbose bug report I have ever seen. > > On 11/26/2013 05:44 PM, Stephen Crowley wrote: > > Language subdirectory: java > > Search paths: > > ./ > > /usr/include/ > > ./swig_lib/java/ > > /usr/share/swig2.0/java/ > > ./swig_lib/ > > /usr/share/swig2.0/ > > Preprocessing... > > /usr/include/bits/wchar.h:35: Warning 202: Could not > > evaluate expression 'L'\0' - 1 > 0' > > /usr/include/bits/wchar.h:35: Warning 202: Error: 'Syntax error: > > expected operator' > > /usr/include/bits/wchar.h:43: Warning 202: Could not evaluate > > expression 'L'\0' - 1 > 0' > > /usr/include/bits/wchar.h:43: Warning 202: Error: 'Syntax error: > > expected operator' > > retroshare/rsdht.h:30: Error: Unable to find 'string' > > retroshare/rsdht.h:31: Error: Unable to find 'list' > > > I wonder why anybody would want to use the -includeall option. This only > leads to wrapping all stuff that accidently get included by the library > one wants to wrap. > > Anyway, I tried to reproduce this and it seems to work here: > > (sid)torsten@sharokan:~/debbug_730570$ cat wchar.i > %module wchar > > #include <bits/wchar.h> > > (sid)torsten@sharokan:~/debbug_730570$ swig2.0 -java -v -includeall > -I/usr/include/x86_64-linux-gnu wchar.i > Language subdirectory: java > Search paths: > ./ > /usr/include/x86_64-linux-gnu/ > ./swig_lib/java/ > /usr/share/swig2.0/java/ > ./swig_lib/ > /usr/share/swig2.0/ > Preprocessing... > Starting language-specific parse... > Processing types... > C++ analysis... > Generating wrappers... > > At least it does not fail with a syntax error. The wrapper does include > neither __WCHAR_MAX nor __WCHAR_MIN, which are defined around the > wchar.h lines causing the error for you: > > (sid)torsten@sharokan:~/debbug_730570$ sed -n -e 35,36p -e 43,44p > /usr/include/x86_64-linux-gnu/bits/wchar.h > #elif L'\0' - 1 > 0 > # define __WCHAR_MAX (0xffffffffu + L'\0') > #elif L'\0' - 1 > 0 > # define __WCHAR_MIN (L'\0' + 0) > > So it seems like SWIG does not support wide character constants. I tried > to SWIG the following definitions: > > #define WIDE_CHAR L'T' > #define WIDE_STR L"Hello there" > > They generate nothing... > There is an upstream bug about non-support of wide character strings > here: http://sourceforge.net/p/swig/bugs/971/ > > Greetings, Torsten > -- Stephen Crowley Principal | International Equities Group Canaccord Genuity Inc. 350 Madison Avenue New York, NY 10017 T: 212-389-8193 C: 917-376-7830 IM: scrowleycg E:scrow...@canaccord.com | www.canaccordgenuity.com
signature.asc
Description: This is a digitally signed message part