Re: [gcj+cni] Segmentation fault when accessing java code from c++

David Daney <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Christian Nolte wrote:

> 
> int main() {
>   Test t;
>   t.test2();
> }
> - ---
> 
.
.
.
> 
> Am I doing something wrong, i.e. do I miss some preinitialization which
> is needed to get CNI working? Or is this a bug in my libgcj?
> 

In short yes.  If you are calling from C++ into CNI code, you must use 
the invocation interface (much as you must use the JIN invocation 
interface when using JIN).

See: http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcj/Invocation.html

For details.

David Daney
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.