[vtkusers] The java and TCL wrappers

Liam K quantum.leaf at googlemail.com
Mon Apr 21 12:17:22 EDT 2008


Hi Raul,

I think the answer to your problem is that you need to make:
  JAVA_AWT_LIBRARY
point to the libjawt.so

(i'm a digest reader so you may already have had a reply to this).
You may have a with libmawt after that, in which case see my recent post.

extract from that post :
I dont know why make can't find libmawt.so it's there in the motif21
sub-dir. Though ii seemed a bit dodgy i copied that .so up one dir so it was
in the same ../jre/lib dir as libjawt.so and:

[100%] Building CXX object
Widgets/Testing/Cxx/CMakeFiles/WidgetsCxxTests.dir/TestImageTracerWidget.o

Linking CXX executable ../../../bin/WidgetsCxxTests
[100%] Built target WidgetsCxxTests

great!!!

i wonder why libmawt wasn't found. There was a JAVA_JVM_LIBRARY option that
wasn't set... maybe it was to do with that... i'm not everyone who tries to
compile vtk on linux has this problem.

..........

Liam


Message: 3
Date: Mon, 21 Apr 2008 00:43:39 -0500
From: "Raul Gerardo Huertas Paiva" <rax20037 at gmail.com>

   1. Subject: [vtkusers] The java and TCL wrappers

To: vtkusers at vtk.org
Message-ID:
       <b3729ebe0804202243o28292f80oacecf1876e0b29c5 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello

I wanted to build the Java and python APIS but I had some problemes, with
the Java API appeared this message:

[ 97%] Building CXX object
Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/VTKJava.o
Linking CXX executable ../../bin/VTKJavaExecutable
/home/raulhuertas/Documents/Instaladores/VTK/vtk-5.0.4/bin/libvtkRenderingJava.so:
undefined reference to `JAWT_GetAWT'
collect2: ld returned 1 exit status
make[2]: *** [bin/VTKJavaExecutable] Error 1
make[1]: *** [Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/all] Error 2
make: *** [all] Error 2

My first try to fix this was to add manually with the compilation flags all
the dirs and link with this options: -ljava -ljvm -ljawt -lmawt ... and
including the dirs of this libraries... but as soon as I append this
libraries, they need more libraries and I think this should be an automatic
task.

After trying a while I finally pass this java inconvenients but the TCL
wrappers( which I turn off) at 98% throws me that there was an error during
conversions :S.

How the Java and Python wrappers should be build. i'm using this variables:

CMAKE_EXE_LINKER_FLAGS
-I/usr/lib/jvm/java-6-sun/jre/lib/i386/
-I/usr/lib/jvm/java-6-sun/jre/lib/i386/xawt/

JAVACOMMAND
/usr/bin/java

 JAVA_ARCHIVE
/usr/bin/jar

 JAVA_AWT_INCLUDE_PATH
/usr/lib/jvm/java-6-sun-1.6.0.03/include

 JAVA_AWT_LIBRARY
/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386/libawt.so

 JAVA_COMPILE
/usr/bin/javac

 JAVA_INCLUDE_PATH
/usr/lib/jvm/java-6-sun/include

 JAVA_INCLUDE_PATH2
/usr/lib/jvm/java-6-sun/include/linux

 JAVA_JVM_LIBRARY
/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib

 JAVA_RUNTIME                     /usr/bin/java
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://www.vtk.org/pipermail/vtkusers/attachments/20080421/7d440b71/attachment-0001.htm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080421/4e1a3be1/attachment.htm>


More information about the vtkusers mailing list