From: scraggy <nei...@eu...> - 2007-04-18 09:23:38
|
Hello, I would appriciated any help on what I assume is a simple problem. I am trying to map the following C struct into the JAVA world: struct FREDDY { int i; }; And then in JAVA FREDDY fred [ ] = new FREDDY [ 10 ]; fred[0].setI(10); The assignment to fred[0] crashes at runtime with java.lang.NullPointerException. I have added into the .i file JAVA_ARRAYSOFCLASSES(struct FREDDY) JAVA_ARRAYSOFCLASSES(FREDDY) but this did not help. Am I missing something simple ? I just don't understand why it doesn't work. I am using swig 1.3.31 Best regards Neil -- View this message in context: http://www.nabble.com/JAVA-arrays-of-C-struct-tf3599825.html#a10055111 Sent from the swig-user mailing list archive at Nabble.com. |