[vtkusers] What could the possible problem be?
Jeff Lee
jeff at cdnorthamerica.com
Fri Feb 1 07:58:00 EST 2002
Hi Jason,
The native methods get mangled in a certain way so that java can find
them The method is defined in libvtkCommonJava.so as
Java_vtkPanel_SetSizeInternal(...) (see vtkJavaAwt.h). Because you put
vtkPanel into a package, java is looking for somtehing like
Java_vtk_vtkPanel_SetSizeInternal(...). You can see exactly which
method java is looking for if you type 'javah -jni vtkPanel'. Because
of the way vtk is built, you cannot put vtkPanel into a package. Take
the package declaration out of vtkPanel and change your other code to
look for vtkPanel, not vtk.vtkPanel. Of course, vtkPanel needs to be
somewhere in your CLASSPATH...
-Jeff
Rodrigues, Jason (MED) wrote:
>
> Hye all,
>
> I downloaded vtk4.0 for upgrading my vtkPrograms to new vresion from the
>site, but found that vtk.vtkPanel didnt exist in that package. so made a
>separate packeg just for vtkPanel. Now Whenever I call this vtkPanel from
>that Package It throws me an unsatisfied linker error as below.
>
>
>java.lang.UnsatisfiedLinkError: SetSizeInternal
> at vtktmp.vtkPanel.SetSizeInternal(Native Method)
> at vtktmp.vtkPanel.setSize(vtkPanel.java:62)
> at vtkexample.<init>(vtkexample.java:11)
> at vtkexample.main(vtkexample.java:26)
>
>Following was the place where there was a native call for setting the Size
>of the vtkPanel
> private native void RenderCreate(vtkRenderWindow id0);
> private native void RenderInternal(vtkRenderWindow id0);
> private native void SetSizeInternal(vtkRenderWindow id0, int x, int y);
>
>
>Thought The vtkPanel class had sucessfully loaded the libraries int the
>vtkPanel program,
> System.loadLibrary("vtkCommonJava");
> System.loadLibrary("vtkFilteringJava");
> System.loadLibrary("vtkIOJava");
> System.loadLibrary("vtkImagingJava");
> System.loadLibrary("vtkGraphicsJava");
> System.loadLibrary("vtkRenderingJava");
>the above linker error still existed.
> Can anybody tell me what other things I need to include other than the
>vtkLibraries? If I have to build other dependencies where do I get those dll
>making 'make" files?
>
>
>Anticipating your solution at the earliest,
>Regards,
>JASON RODRIGUES
>
>
>"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
>ADDRESSEE and may contain confidential and privileged information.
>If the reader of this message is not the intended recipient,
>you are notified that any dissemination, distribution or copy of this
>communication is strictly Prohibited.
>If you have received this message by error, please notify us
>immediately, return the original mail to the sender and delete the
>message from your system."
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list