compiling the giws-examples

Sunil S Nandihalli sunil.nandihalli at gmail.com
Wed Sep 8 07:11:32 CEST 2010


Hello everybody,
 I am here because I was trying to use giws. Its really a wonderfull idea ..
to call java from c++ .. I tried to compile the examples and I get the
following error when I try to compile the example2.. The compile log is ...

/usr/lib/jvm/java-6-sun-1.6.0.20/bin/javac  example2/MyObjectWithArray.java
../../giws -f MyObjectWithArray.giws.xml -p
example2.hxx generated ...
example2.cpp generated ...
g++ main.cpp example2.cpp example2.hxx -g -ljvm
-L/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386
-L/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/client/
-I/usr/lib/jvm/java-6-sun-1.6.0.20/include
-I/usr/lib/jvm/java-6-sun-1.6.0.20/include/linux  -o myExample2
main.cpp: In function ‘int main()’:
main.cpp:87: warning: deprecated conversion from string constant to ‘char*’
main.cpp:87: warning: deprecated conversion from string constant to ‘char*’
main.cpp:87: warning: deprecated conversion from string constant to ‘char*’
example2.cpp: In member function ‘bool*
example2::MyObjectWithArray::dealingWithBooleans(bool*, int)’:
*example2.cpp:339: error: invalid static_cast from type ‘bool*’ to type
‘jboolean*’*
make: *** [myExample2] Error 1

I am running on
ubuntu 10.04

 java version java-6-sun-1.6.0.20

 g++ -v gives
g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin
--enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

can anybody tell me how to fix this.. I am able to compile and run the other
3 examples.
Thanks for reading this..
 Sunil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100908/d5563880/attachment.htm>


More information about the users mailing list