Incorrect Java methods called from CNI

Dave Menendez dave@sycamore.us
Thu May 13 18:51:00 GMT 2004


On Thu, 2004年05月13日 at 12:57, Bryce McKinlay wrote:
> Dave Menendez wrote:
>> >Cleaned everything and tried to build again, but got the following
> >compiler error when compiling Classification.cpp:
> >
> >
> >In file included from
> >./jblocks/security/classification/Classification.h:8,
> > from Classification.cpp:7:
> >./jblocks/security/classification/AbstractClassificationModel.h:30:
> >error: Java method 'jblocks::security::classification::Classification*
> >jblocks::security::classification::AbstractClassificationModel::getClassification()' has non-Java return type `jblocks::security::classification::Classification*'
> >
<snip>
> Strange - I'm not sure what would cause that. Perhaps try including 
> AbstractClassificationModel.h directly from your .cpp file, although I 
> guess that shouldn't be neccessary.

This one was my fault. In my C++ wrapper class for Classification, I
had a forward declaration for the jblocks.security.Classification class,
but I had neglected to wrap it in an extern "Java" block. After fixing
that and running my test again, your suggestion of placing an abstract
declaration in the Java file for the unimplemented interface method
worked like a charm.
Thanks so much for your help!
Dave


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /