This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Incorrect Java methods called from CNI


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]