[vtkusers] libvtkJava and libXt

Peter F Bradshaw pfb at users.sourceforge.net
Thu Jan 18 09:51:10 EST 2001


Hi Randy;

On Tue, 16 Jan 2001, Randy Heiland wrote:

> Peter,
> 
> Just wondering if you got your problem solved yet?
> 
> I have been using VTK & Java together on both an SGI/Irix and a Linux box for
> some time (and Windows NT too, but using pre-built libs).
> 
> I was able to take your 'xxx' pgm and, after commenting out:
> 
> //import Gui.Common.*;
> 
> it ran just fine - on both IRIX & Linux.  I don't know where this pkg came
> from, but out of curiosity, what happens when you comment it out?
> 
> Also, it didn't matter if I commented out loading Xt -- it ran regardless:
>   System.loadLibrary("Xt");
> 
> FWIW, my build on Linux was --with-{opengl,java,shared,x} (+ contrib &
> patented).  And as I reported earlier, I did have to explicitly link in
> libXt.so to libvtkJava.so via:
> 
> gcc -shared -o libvtkJava.so  \
> -L/usr/local/src/vtk3.2/common  -lVTKCommonJava -lVTKCommon \
> -L/usr/local/src/vtk3.2/graphics -lVTKGraphicsJava -lVTKGraphics \
> -L/usr/local/src/vtk3.2/imaging -lVTKImagingJava -lVTKImaging \
> -L/usr/local/src/vtk3.2/patented  -lVTKPatentedJava -lVTKPatented \
> -L/usr/local/src/vtk3.2/contrib -lVTKContribJava -lVTKContrib  \
> -lGL -ldl -L/usr/X11R6/lib -lXext -lXt -lSM -lICE -lX11 -lm
> 
.
.
.
> 
> --Randy

Thanks for the post. very informative. It is reassuring to see that somebody
is using Java and Vtk together successfully.

The short answer is that I'm still having the problem.

The import GuiCommon.*; was the result of a cut and paste. It does not do
anything in this example.

I've now got to the stage where it does not matter whether I include the 
System.loadLibrary("Xt") - it now SEGVs all the time. I had forgotten to use
the configure --with-x option.

I'm now now linking libvtkJava with arguments similar to yours. The only
difference is that I'm not including the Contrib and Patented libraries and
using MesaGL instead of GL. The latter must be the problem so I'll reinstall 
it.

Cheers

--
Peter F Bradshaw          | http://members.dingoblue.net.au/~pfb
pfb at users.sourceforge.net | PGP public key at
http://www.pfb.tsx.org    | http://members.dingoblue.net.au/~pfb/public_key.html
ICQ 75431157 (exadios)    | "Needs more salt" - Archimedes






More information about the vtkusers mailing list