[vtkusers] Solution : VTK compilation on Mac OS X with the Java Wrapping
Sebastien Jourdain
jourdain at artenum.com
Mon Nov 12 14:40:24 EST 2007
Hello,
I just wanted to post a solution to a common problem where it is
difficult to find a clear answear.
I've also updated the wiki to explain the tricky part here
http://www.vtk.org/Wiki/Cocoa_VTK
So if you want to compile VTK on Mac OS X with the Java Wrapping you
might get an error like the following one:
/building shared library
///usr/local/src/VTK/bin/libvtkRenderingJava.dylib...
l//d: Undefined symbols:
//_JAWT_GetAWT
If so just add at the end of the line of the file Rendering/CMakeFiles/vtkRenderingJava.dir/link.txt
the following text without the double quote: "-framework JavaVM"
=> Thanks to /*Mike Jackson : http://www.vtk.org/pipermail/vtkusers/2007-January/089156.html*
The full procedure is described below:
Download : http://www.vtk.org/files/release/5.0/vtk-5.0.3.tar.gz
cd MY_INSTALL_VTK
tar xvfz vtk-5.0.3.tar.gz
mkdir build
mkdir bin
cd build
ccmake -i ../VTK
####### CMake Config ########
BUILD_SHARED_LIBS ON
VTK_USE_CARBON OFF
VTK_USE_COCOA ON
VTK_USE_RENDERING ON
VTK_USE_RPATH ON
VTK_WRAP_JAVA ON
CMAKE_INSTALL_PREFIX MY_INSTALL_VTK/bin
###########################
make
IF YOU GET THE Undefined symbols:/ _JAWT_GetAWT/ ERROR
edit the file Rendering/CMakeFiles/vtkRenderingJava.dir/link.txt and add
: -framework JavaVM
at the end of the line. Then keep going.
make
make install
Seb
PS: On the CVS I have a problem with the compilation on the
C++/ObjectiveC layer for the rendering.
If someone has a clue how to solve this error, he's welcome...
This is the error that I get with the CVS code when I compile without
the java wrapping.
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm: In member
function 'virtual const char* vtkCocoaRenderWindow::ReportCapabilities()':
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:206: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:209: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:212: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:215: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:218: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:221: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:224: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:227: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:230: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm: In member
function 'virtual int vtkCocoaRenderWindow::SupportsOpenGL()':
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:256: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm: In member
function 'virtual int vtkCocoaRenderWindow::IsDirect()':
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:275: error:
invalid conversion from 'GLint*' to 'long int*'
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm: In member
function 'void vtkCocoaRenderWindow::CreateGLContext()':
/Users/seb/latest-src/VTK/Rendering/vtkCocoaRenderWindow.mm:591: error:
invalid conversion from 'GLint*' to 'const long int*'
make[2]: ***
[Rendering/CMakeFiles/vtkRendering.dir/vtkCocoaRenderWindow.o] Error 1
make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] Error 2
make: *** [all] Error 2
More information about the vtkusers
mailing list