[vtk-developers] Problems installing VTK

CSharpdotcom . csharpdotcom at gmail.com
Mon Mar 23 18:11:00 EDT 2015


Great news, I finally got VTK to work, so thank you very much for all
your help!!!

I used the example at:
https://www.particleincell.com/2011/vtk-java-visualization/ with
NetBeans.

Christopher Sharp

On Mon, Mar 23, 2015 at 11:13 AM, CSharpdotcom . <csharpdotcom at gmail.com> wrote:
> OK, here is exactly what I have done so far, and have been making
> notes as follows:
>
> Instructions on using CMake 3.3.0 from:
>
> http://www5.cs.fau.de/en/conrad/tutorials/itk-and-vtk-wrapping/wrap-vtk
> https://www.particleincell.com/2011/vtk-java-visualization/
> sebastien.jourdain at kitware.com with CC to vtk-developers at vtk.org
>
> 1) Start CMake 3.3.0
>
> 2) Click "Advanced", enter "Java" in search window, then click "+ Add Entry".
>    "Java" will appear under "Name" in the window below in red.  On the
> right click "..." and a browse
>
> folder
>    window opens.  Select "C:/Program Files (x86)/Java/jdk1.8.0_31/bin"
> for the 32 bit Java comiler.
>
> 3) Select as source -
> C:/Users/Christopher/Documents/newb6sigma/VTK-6.1.0/src/VTK-6.1.0
>
> 4) Select as build binaries - C:/VTK
>
> 5) Create empty folder C:/VTK
>
> 6) Click "Configure" then select Visualt Studio 2010 - Use default
> native compilers - Click "Finish"
>    CMakes write output: log1.txt
>
> 7) Red screen displayed with the following items:
>
>    Module_vtkWebJavaScript
>    Module_vtkWrappingJava
>    VTK_WRAP_JAVA
>
> 8) Check Module_vtkWrappingJava and VTK_WRAP_JAVA then press "Configure" again.
>
> 9) Copy the output to log2.txt.  The screem shows the following items in red:
>
>    JAVA_AWT_INCLUDE_PATH        C:/Program Files (x86)/Java/jdk1.8.0_31/include
>    JAVA_AWT_LIBRARY             C:/Program Files
> (x86)/Java/jdk1.8.0_31/lib/jawt.lib
>    JAVA_INCLUDE_PATH            C:/Program Files (x86)/Java/jdk1.8.0_31/include
>    JAVA_INCLUDE_PATH2           C:/Program Files
> (x86)/Java/jdk1.8.0_31/include/win32
>    JAVA_JVM_LIBRARY             C:/Program Files
> (x86)/Java/jdk1.8.0_31/lib/jvm.lib
>    Java_JAR_EXECUTABLE          C:/Program Files
> (x86)/Java/jdk1.8.0_31/bin/jar.exe
>    Java_JAVAC_EXECUTABLE        C:/Program Files
> (x86)/Java/jdk1.8.0_31/bin/javac.exe
>    Java_JAVADOC_EXECUTABLE      C:/Program Files
> (x86)/Java/jdk1.8.0_31/bin/javadoc.exe
>    Java_JAVAH_EXECUTABLE        C:/Program Files
> (x86)/Java/jdk1.8.0_31/bin/javah.exe
>    Java_JAVA_EXECUTABLE         C:/Program Files
> (x86)/Java/jdk1.8.0_31/lib/java.exe
>    VTK_JAVA_INSTALL             Unchecked
>    VTK_JAVA_JOGL_COMPONENT      Unchecked
>    VTK_JAVA_SWP_COMPONENR       Unchecked
>
>    The previous items from (7) are shown below not in red with the
> last two checked.
>    Check VTK_JAVA_INSTALL then press "Configure" again.
>
> 10) Copy the output to log3.txt.
>
> 11) Click "Generate" - output "Generating done" when completed.
>
> The following warnings were printed out at the last configuration:
>
> CMake Warning (dev) at ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt:607
> (ADD_CUSTOM_COMMAND):
> Policy CMP0040 is not set: The target in the TARGET signature of
> add_custom_command() must exist. Run "cmake --help-policy CMP0040" for
> policy details. Use the cmake_policy command to set the policy and
> suppress this warning.
>
> The target name "C:/VTK/ThirdParty/hdf5/vtkhdf5/H5Edefin.h" is unknown in
> this context.
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt:614
> (ADD_CUSTOM_COMMAND):
> Policy CMP0040 is not set: The target in the TARGET signature of
> add_custom_command() must exist. Run "cmake --help-policy CMP0040" for
> policy details. Use the cmake_policy command to set the policy and
> suppress this warning.
>
> The target name "C:/VTK/ThirdParty/hdf5/vtkhdf5/H5version.h" is unknown in
> this context.
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt:621
> (ADD_CUSTOM_COMMAND):
> Policy CMP0040 is not set: The target in the TARGET signature of
> add_custom_command() must exist. Run "cmake --help-policy CMP0040" for
> policy details. Use the cmake_policy command to set the policy and
> suppress this warning.
>
> The target name "C:/VTK/ThirdParty/hdf5/vtkhdf5/H5overflow.h" is unknown in
> this context.
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> Please let me know if there are any problems.
>
> I'm having a break for Lunch and will be back online shortly after
> 13:00 (1:00 pm) Arizona time, then will run Visual Studio, which could
> take a while.
>
> Christopher Sharp
>
> On Mon, Mar 23, 2015 at 10:37 AM, CSharpdotcom . <csharpdotcom at gmail.com> wrote:
>> OK, now CMake displays a screen with only 3 entries in red:
>>
>> Module_vtkWebJavaScript
>> Module_vtkWrappingJava
>> VTK_WRAP_JAVA
>>
>> I certainly need the last, and possibly Module_vtkWrappingJava, so I
>> will check those and click Configure again.  The BUILD_SHARED_LIBS
>> option and the other do not appear, and I don't know why.
>>
>> On Mon, Mar 23, 2015 at 10:09 AM, CSharpdotcom . <csharpdotcom at gmail.com> wrote:
>>> OK, many thanks, I havn't done that before.  This is what I just did
>>> with CMake, I checked the Advanced box, entered "Java" in the search
>>> window on the left, then clicked " +Add Entry".  Below the word "Java"
>>> appeared under "Name", then searched for the 32 bit Java compiler on
>>> the right, which is at C:/Program Files (x86)/Java/jdk1.8.0_31/bin.
>>>
>>> So far so good, I will now start up CMake 3.3.0 again from scratch,
>>> having deleted all the old files.  After all this I will let you know
>>> what happens.
>>>
>>> Christopher Sharp
>>>
>>> On Sun, Mar 22, 2015 at 9:54 PM, Sebastien Jourdain
>>> <sebastien.jourdain at kitware.com> wrote:
>>>> Toggle the advance mode in cmake and search for java, just to make sure
>>>> cmake find the right version of the lib.
>>>>
>>>> Seb
>>>>
>>>> On Sun, Mar 22, 2015 at 10:46 PM, CSharpdotcom . <csharpdotcom at gmail.com>
>>>> wrote:
>>>>>
>>>>> Before I saw your message I tried building from scratch again, but
>>>>> still have errors.
>>>>>
>>>>> I didn't see in the link:
>>>>>
>>>>> https://www.particleincell.com/2011/vtk-java-visualization/
>>>>>
>>>>> anything about using 32 bit Java in CMake, but it does say it has to
>>>>> be used with Visual Studio.  After Googling around, I saw that the
>>>>> path environmental variable has to be set to the 32 bit Java, so I
>>>>> used C:\Program Files (x86)\Java\jre1.0.0_31\bin\client, where the
>>>>> file jvm.dll is located.
>>>>>
>>>>> I will now try again from scratch, with CMake using 32 bit Java.  I've
>>>>> just set on my Windows 8 computer the following paths:
>>>>>
>>>>> JAVA_HOME = C:\Progra~2\Java\jdg1.8.0_31
>>>>> PATH = C:\Program Files (x86)\jre1.8.-_31\bin
>>>>>
>>>>> and will reboot and start again.
>>>>>
>>>>> Christopher Sharp
>>>>>
>>>>> On Sun, Mar 22, 2015 at 8:58 PM, Sebastien Jourdain
>>>>> <sebastien.jourdain at kitware.com> wrote:
>>>>> > You need to properly set cmake so you don't build the swt nor the Jogl
>>>>> > components for Java. (You don't need them as you don't know what they are.)
>>>>> > Moreover the jvm 32b should also be set via cmake. Otherwise VTK won't build
>>>>> > correctly.
>>>>> >
>>>>> > Seb
>>>>> >
>>>>> >> On Mar 22, 2015, at 16:05, CSharpdotcom . <csharpdotcom at gmail.com>
>>>>> >> wrote:
>>>>> >>
>>>>> >> Hello,
>>>>> >>
>>>>> >> I decided not to install Visual Studio Express, as according to the
>>>>> >> website Visual Studio Pro was used, which is exactly what I've been
>>>>> >> using.
>>>>> >>
>>>>> >> Anyway, I created a new build folder and repeated the whole process
>>>>> >> from scratch.  The error I'm still getting is:
>>>>> >>
>>>>> >> 117>Link:
>>>>> >> 117>     Creating library C:/VTK/lib/Release/vtkRenderingCoreJava.lib
>>>>> >> and object C:/VTK/lib/Release/vtkRenderingCoreJava.exp
>>>>> >> 117>vtkRenderWindowJava.obj : error LNK2019: unresolved external
>>>>> >> symbol __imp__JAWT_GetAWT at 8 referenced in function
>>>>> >> _Java_vtk_vtkPanel_RenderCreate at 12
>>>>> >> 117>C:\VTK\bin\Release\vtkRenderingCoreJava.dll : fatal error LNK1120:
>>>>> >> 1 unresolved externals
>>>>> >> 124>  Generating Code...
>>>>> >> 117>
>>>>> >> 117>Build FAILED.
>>>>> >>
>>>>> >> which is almost certainly due to Visual Studio trying to use 64 bit
>>>>> >> Java, which is incompatible with the 32 bit code it generates.  I was
>>>>> >> unaware that Visual Studio has to use Java.  This should be easy to
>>>>> >> fix by setting the path it uses to a 32 JVM.
>>>>> >>
>>>>> >> In addition, there are two other errors which appear to be related to
>>>>> >> the components VTK_JAVA_SWT_COMPONENT and VTK_JAVA_SWT_COMPONENT
>>>>> >> checked in the DMake window, which seem not to be installed in my
>>>>> >> system.  What do they do, and are they needed for what I want to do?
>>>>> >> If so, I need to find out how to install them, otherwise they can
>>>>> >> presumably be ignored.
>>>>> >>
>>>>> >> Christopher Sharp
>>>>> >>
>>>>> >>> On Sun, Mar 22, 2015 at 11:04 AM, CSharpdotcom .
>>>>> >>> <csharpdotcom at gmail.com> wrote:
>>>>> >>> Many thanks for your message; what I will do now is backup my VTK
>>>>> >>> folder, then instead of using Visual Studio 2010 Pro, I will download
>>>>> >>> the latest version of Visual Studio C++ Express, which is 2013 I
>>>>> >>> think, and try using DMake again form scratch.  In the process I will
>>>>> >>> note exactly what I did, so if these problems persist, I will have a
>>>>> >>> record.
>>>>> >>>
>>>>> >>> csharp
>>>>> >>>
>>>>> >>> On Sun, Mar 22, 2015 at 7:18 AM, Sebastien Jourdain
>>>>> >>> <sebastien.jourdain at kitware.com> wrote:
>>>>> >>>> I didn't see anything strange but can you explain your build process?
>>>>> >>>> Which property you changed in cmake and how/what did you build in visual
>>>>> >>>> studio?
>>>>> >>>>
>>>>> >>>> Seb
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>> On Mar 22, 2015, at 00:11, CSharpdotcom . <csharpdotcom at gmail.com>
>>>>> >>>>> wrote:
>>>>> >>>>>
>>>>> >>>>> OK, many thanks, I didn't know that there was such a file, this is
>>>>> >>>>> because I'm so new to VTK and CMake.  The file is in the root folder
>>>>> >>>>> and is attached here.
>>>>> >>>>>
>>>>> >>>>> I look forward finally to getting this sorted out, as it has now
>>>>> >>>>> tied
>>>>> >>>>> me up for about a week.
>>>>> >>>>>
>>>>> >>>>> Christopher Sharp
>>>>> >>>>>
>>>>> >>>>> On Sat, Mar 21, 2015 at 8:59 PM, Sebastien Jourdain
>>>>> >>>>> <sebastien.jourdain at kitware.com> wrote:
>>>>> >>>>>> I didn't know you had a partial build of VTK. Can you share you
>>>>> >>>>>> CMakeCache.txt.
>>>>> >>>>>>
>>>>> >>>>>> You must have wrongly setup your build.
>>>>> >>>>>>
>>>>> >>>>>> Seb
>>>>> >>>>>>
>>>>> >>>>>> On Sat, Mar 21, 2015 at 6:05 PM, CSharpdotcom .
>>>>> >>>>>> <csharpdotcom at gmail.com>
>>>>> >>>>>> wrote:
>>>>> >>>>>>>
>>>>> >>>>>>> Hello,
>>>>> >>>>>>>
>>>>> >>>>>>> Many thanks, but as I'm new ti VTK I don't know which libraries to
>>>>> >>>>>>> load.  However, in looking at:
>>>>> >>>>>>>
>>>>> >>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Java/Miscellaneous/Cone6
>>>>> >>>>>>>
>>>>> >>>>>>> which has similar code.  The statement:
>>>>> >>>>>>>
>>>>> >>>>>>> System.loadLibrary("vtkCommonJava");
>>>>> >>>>>>>
>>>>> >>>>>>> doesn't load as there is no dll with that name in the folder
>>>>> >>>>>>> C:\VTK\bin\Release, but:
>>>>> >>>>>>>
>>>>> >>>>>>> System.loadLibrary("vtkCommonCoreJava");
>>>>> >>>>>>>
>>>>> >>>>>>> does load correctly as there is a dll with that name.  This
>>>>> >>>>>>> applies to
>>>>> >>>>>>> a few other files, but not all of them.  Without the required dlls
>>>>> >>>>>>> loaded, even if no errors are produced, the code will not execute.
>>>>> >>>>>>>
>>>>> >>>>>>> If I go back to the original code when I try and load everything,
>>>>> >>>>>>> then
>>>>> >>>>>>> I get the error message:
>>>>> >>>>>>>
>>>>> >>>>>>> java.lang.UnsatisfiedLinkError:
>>>>> >>>>>>> C:\VTK\bin\Release\vtkChartsCoreJava.dll: Can't find dependent
>>>>> >>>>>>> libraries
>>>>> >>>>>>>
>>>>> >>>>>>> The file vtkChartsCoreJava.dll is present in that folder, so it is
>>>>> >>>>>>> loaded, but its dependencies cannot be found.  This applies to
>>>>> >>>>>>> quite a
>>>>> >>>>>>> few other dll files with dependencies, and I also get a list of a
>>>>> >>>>>>> large number files that were not loaded from the statement:
>>>>> >>>>>>>
>>>>> >>>>>>> if (!lib.IsLoaded()) System.out.println(lib.GetLibraryName() + "
>>>>> >>>>>>> not
>>>>> >>>>>>> loaded");
>>>>> >>>>>>>
>>>>> >>>>>>> inside the for-loop in an earlier message.
>>>>> >>>>>>>
>>>>> >>>>>>> It looks that without these large number of files, possibly all of
>>>>> >>>>>>> them, that have not been loaded the code will not work, even if I
>>>>> >>>>>>> skip
>>>>> >>>>>>> over the bad loads or put the loop in a try-catch loop.  This must
>>>>> >>>>>>> have something to do with the error message in the log during the
>>>>> >>>>>>> build process with Visual Studio Pro 2010 I did a few days ago.
>>>>> >>>>>>>
>>>>> >>>>>>> I don't fully understand the log, but the section where it failed
>>>>> >>>>>>> is here:
>>>>> >>>>>>>
>>>>> >>>>>>> 112>Link:
>>>>> >>>>>>> 112>     Creating library
>>>>> >>>>>>> C:/VTK/lib/Release/vtkRenderingCoreJava.lib
>>>>> >>>>>>> and object C:/VTK/lib/Release/vtkRenderingCoreJava.exp
>>>>> >>>>>>> 114>  vtkDepthPeeling_fs.cxx
>>>>> >>>>>>> 114>  vtkGaussianBlurPassShader_fs.cxx
>>>>> >>>>>>> 114>  vtkLighting_s.cxx
>>>>> >>>>>>> 114>  vtkLightingHelper_s.cxx
>>>>> >>>>>>> 114>  vtkOpenGLRenderer_PeelingFS.cxx
>>>>> >>>>>>> 114>  vtkOpenGLPropertyDefaultPropFunc_fs.cxx
>>>>> >>>>>>> 114>  vtkOpenGLPropertyDefaultPropFunc_vs.cxx
>>>>> >>>>>>> 112>vtkRenderWindowJava.obj : error LNK2019: unresolved external
>>>>> >>>>>>> symbol __imp__JAWT_GetAWT at 8 referenced in function
>>>>> >>>>>>> _Java_vtk_vtkPanel_RenderCreate at 12
>>>>> >>>>>>> 112>C:\VTK\bin\Release\vtkRenderingCoreJava.dll : fatal error
>>>>> >>>>>>> LNK1120:
>>>>> >>>>>>> 1 unresolved externals
>>>>> >>>>>>> 114>  vtkOpenGLPropertyDefaultMain_fs.cxx
>>>>> >>>>>>> 112>
>>>>> >>>>>>> 112>Build FAILED.
>>>>> >>>>>>> 112>
>>>>> >>>>>>> 112>Time Elapsed 00:01:32.30
>>>>> >>>>>>>
>>>>> >>>>>>> Obviously vtkRenderingCoreJava.dll failed to link, which must be
>>>>> >>>>>>> the
>>>>> >>>>>>> cause of the problems I'm having.  This was the only failure, with
>>>>> >>>>>>> the
>>>>> >>>>>>> other 387 compilations and linking successful.  If this problem
>>>>> >>>>>>> can be
>>>>> >>>>>>> fixed, I hope I will be home and dry.
>>>>> >>>>>>>
>>>>> >>>>>>> I would most appreciate you or someone else kindly getting this
>>>>> >>>>>>> resolved.
>>>>> >>>>>>>
>>>>> >>>>>>> csharp
>>>>> >>>>>>>
>>>>> >>>>>>> On Sat, Mar 21, 2015 at 3:04 PM, Sebastien Jourdain
>>>>> >>>>>>> <sebastien.jourdain at kitware.com> wrote:
>>>>> >>>>>>>> Try to load the libraries that you need to load instead of all of
>>>>> >>>>>>>> them.
>>>>> >>>>>>>> It
>>>>> >>>>>>>> seems that you didn't build everything (which is probably fine).
>>>>> >>>>>>>>
>>>>> >>>>>>>> Seb
>>>>> >>>>>>>>
>>>>> >>>>>>>> On Sat, Mar 21, 2015 at 2:58 PM, CSharpdotcom .
>>>>> >>>>>>>> <csharpdotcom at gmail.com>
>>>>> >>>>>>>> wrote:
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> I already had PATH=C:\VTK\bin\Release, and added ;%PATH% at the
>>>>> >>>>>>>>> end,
>>>>> >>>>>>>>> but it still doesn't work, and get the following output:
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> java.lang.UnsatisfiedLinkError:
>>>>> >>>>>>>>> C:\VTK\bin\Release\vtkChartsCoreJava.dll: Can't find dependent
>>>>> >>>>>>>>> libraries
>>>>> >>>>>>>>>   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>>>> >>>>>>>>>   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
>>>>> >>>>>>>>> at
>>>>> >>>>>>>>> java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
>>>>> >>>>>>>>>   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
>>>>> >>>>>>>>>   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>>>>> >>>>>>>>>   at java.lang.System.loadLibrary(System.java:1119)
>>>>> >>>>>>>>>   at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:214)
>>>>> >>>>>>>>> at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:214)
>>>>> >>>>>>>>>   at
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> vtk.vtkNativeLibrary.LoadAllNativeLibraries(vtkNativeLibrary.java:149)
>>>>> >>>>>>>>>   at
>>>>> >>>>>>>>>
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> vtk.sample.rendering.AwtConeRendering.<clinit>(AwtConeRendering.java:19)
>>>>> >>>>>>>>> java.lang.UnsatisfiedLinkError:
>>>>> >>>>>>>>> C:\VTK\bin\Release\vtkDomainsChemistryJava.dll: Can't find
>>>>> >>>>>>>>> dependent
>>>>> >>>>>>>>> libraries
>>>>> >>>>>>>>>   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>>>> >>>>>>>>>   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
>>>>> >>>>>>>>>   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
>>>>> >>>>>>>>>   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>>>>> >>>>>>>>>   at java.lang.System.loadLibrary(System.java:1119)
>>>>> >>>>>>>>>   at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:214)
>>>>> >>>>>>>>>   at
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> vtk.vtkNativeLibrary.LoadAllNativeLibraries(vtkNativeLibrary.java:149)
>>>>> >>>>>>>>>   at
>>>>> >>>>>>>>>
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> vtk.sample.rendering.AwtConeRendering.<clinit>(AwtConeRendering.java:19)
>>>>> >>>>>>>>> ...................
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> These error messages continue, then a list of files not loaded
>>>>> >>>>>>>>> are
>>>>> >>>>>>>>> printed out, as given in the source code.
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> Based on these error messages it's picking up the dll files in
>>>>> >>>>>>>>> the
>>>>> >>>>>>>>> \Release folder, but it's unable to find other files that these
>>>>> >>>>>>>>> dll
>>>>> >>>>>>>>> files depend on.
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> Do you want a full listing of the Java source file?  The
>>>>> >>>>>>>>> AwtConeRendering class starts off with:
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> static {
>>>>> >>>>>>>>>   System.out.println(System.getProperty("java.library.path"));
>>>>> >>>>>>>>>   if (!vtkNativeLibrary.LoadAllNativeLibraries()) {
>>>>> >>>>>>>>>     for (vtkNativeLibrary lib : vtkNativeLibrary.values()) {
>>>>> >>>>>>>>>       if (!lib.IsLoaded()) {
>>>>> >>>>>>>>>         System.out.println(lib.GetLibraryName() + " not
>>>>> >>>>>>>>> loaded");
>>>>> >>>>>>>>>       }
>>>>> >>>>>>>>>     }
>>>>> >>>>>>>>>   }
>>>>> >>>>>>>>>   vtkNativeLibrary.DisableOutputWindow(null);
>>>>> >>>>>>>>> }
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> which is followed by the main() method, which contains
>>>>> >>>>>>>>> statements such
>>>>> >>>>>>>>> as:
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> vtkConeSource cone = new vtkConeSource();
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> csharp
>>>>> >>>>>>>>>
>>>>> >>>>>>>>> On Sat, Mar 21, 2015 at 10:26 AM, Sebastien Jourdain
>>>>> >>>>>>>>> <sebastien.jourdain at kitware.com> wrote:
>>>>> >>>>>>>>>> Te java.library.path is not enough and you need to add into
>>>>> >>>>>>>>>> your
>>>>> >>>>>>>>>> environment
>>>>> >>>>>>>>>> PATH the following directory, C:\VTK\bin\Release.
>>>>> >>>>>>>>>>
>>>>> >>>>>>>>>> set PATH=C:\VTK\bin\Release;%PATH%
>>>>> >>>>>>>>>>
>>>>> >>>>>>>>>> Seb
>>>>> >>>>>>>>>>
>>>>> >>>>>>>>>> On Sat, Mar 21, 2015 at 10:33 AM, CSharpdotcom .
>>>>> >>>>>>>>>> <csharpdotcom at gmail.com>
>>>>> >>>>>>>>>> wrote:
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> Hello,
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> I'm new to VTK and this is my first posting here or on any
>>>>> >>>>>>>>>>> other
>>>>> >>>>>>>>>>> forum
>>>>> >>>>>>>>>>> related to VTK.
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> I've been trying for about a week to get VTK installed and
>>>>> >>>>>>>>>>> running
>>>>> >>>>>>>>>>> on
>>>>> >>>>>>>>>>> my computer.  The project I'm working on is to use Java with
>>>>> >>>>>>>>>>> VTK to
>>>>> >>>>>>>>>>> represent 3D graphics, which I hope to use with NetBeans
>>>>> >>>>>>>>>>> 8.0.2.  I
>>>>> >>>>>>>>>>> also have Visual Studio Pro 2010.
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> After failed attempts in installing VTK  6.2.0 and the latest
>>>>> >>>>>>>>>>> version
>>>>> >>>>>>>>>>> of CMake, from the link
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> http://www5.cs.fau.de/en/conrad/tutorials/itk-and-vtk-wrapping/wrap-vtk
>>>>> >>>>>>>>>>> I downloaded and unzipped VTK 6.1.0 and CMake 3.0.0, then
>>>>> >>>>>>>>>>> installed
>>>>> >>>>>>>>>>> them.
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> I then ran CMake according to the instructions on that link
>>>>> >>>>>>>>>>> and
>>>>> >>>>>>>>>>> installed the generated code in the folder C:\VTK.  I then
>>>>> >>>>>>>>>>> clicked
>>>>> >>>>>>>>>>> on
>>>>> >>>>>>>>>>> the file VTK.sin in that folder, which opened up Visual Studio
>>>>> >>>>>>>>>>> and
>>>>> >>>>>>>>>>> started compiling the code with a large number of modules in
>>>>> >>>>>>>>>>> the
>>>>> >>>>>>>>>>> project.  This took about an hour, and on completion,
>>>>> >>>>>>>>>>> generated the
>>>>> >>>>>>>>>>> line at the end:
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> Build: 387 succeeded, 1 failed, 0 up-to-date, 0 skipped
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> I saved this in a file, which is very long, and after some
>>>>> >>>>>>>>>>> effort
>>>>> >>>>>>>>>>> found the error message:
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> 112>C:\VTK\bin\Release\vtkRenderingCoreJava.dll : fatal error
>>>>> >>>>>>>>>>> LNK1120:
>>>>> >>>>>>>>>>> 1 unresolved externals
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> In the mean time I attempted to recompile the project, which
>>>>> >>>>>>>>>>> was
>>>>> >>>>>>>>>>> much
>>>>> >>>>>>>>>>> quicker, and got the same message.  In  recompiled I checked
>>>>> >>>>>>>>>>> the
>>>>> >>>>>>>>>>> "INSTALL" option, which had not previously been checked,
>>>>> >>>>>>>>>>> although I
>>>>> >>>>>>>>>>> don't know if that is significant.
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> Located in the folder \VTK\java\sample\rendering is the source
>>>>> >>>>>>>>>>> file
>>>>> >>>>>>>>>>> AwTConeRendering.java, which apparently has not been compiled.
>>>>> >>>>>>>>>>> I
>>>>> >>>>>>>>>>> created a NetBeans project and copied that file into it, then
>>>>> >>>>>>>>>>> linked
>>>>> >>>>>>>>>>> vtk.jar in the folder \VTK\bin to the project, and all imports
>>>>> >>>>>>>>>>> were
>>>>> >>>>>>>>>>> satisfied.  In setting the Windows path to point to the dll
>>>>> >>>>>>>>>>> files in
>>>>> >>>>>>>>>>> \VTK\bin\Release, the application appears to pick up the dll
>>>>> >>>>>>>>>>> files
>>>>> >>>>>>>>>>> correctly, however, I get the following error message:
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> java.lang.UnsatisfiedLinkError:
>>>>> >>>>>>>>>>> C:\VTK\bin\Release\vtkChartsCoreJava.dll: Can't find dependent
>>>>> >>>>>>>>>>> libraries
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> repeated for many dll files.  Incidentally, as Visual Studio
>>>>> >>>>>>>>>>> dlls
>>>>> >>>>>>>>>>> are
>>>>> >>>>>>>>>>> all 32 bits, as far as I know, I set up NetBeans to use a 32
>>>>> >>>>>>>>>>> bit
>>>>> >>>>>>>>>>> JVM.
>>>>> >>>>>>>>>>> This had previously been tested successfully with a test dll I
>>>>> >>>>>>>>>>> created
>>>>> >>>>>>>>>>> with Visual Studio and could execute with NetBeans.
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> This problem is presumably related to the first error
>>>>> >>>>>>>>>>> mentioned
>>>>> >>>>>>>>>>> above,
>>>>> >>>>>>>>>>> and would be most grateful in getting this issue resolved.  As
>>>>> >>>>>>>>>>> I
>>>>> >>>>>>>>>>> said,
>>>>> >>>>>>>>>>> I'm new to VTK, and in fact only in the last couple of weeks
>>>>> >>>>>>>>>>> have
>>>>> >>>>>>>>>>> tried for the first time to call a dll file from a Java
>>>>> >>>>>>>>>>> application
>>>>> >>>>>>>>>>> on
>>>>> >>>>>>>>>>> a Windows computer.
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> In the Java code I added the statement:
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> System.out.println(System.getProperty("java.library.path"));
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> to check that the path was correct, which is the case.
>>>>> >>>>>>>>>>> _______________________________________________
>>>>> >>>>>>>>>>> Powered by www.kitware.com
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at
>>>>> >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> Search the list archives at:
>>>>> >>>>>>>>>>> http://markmail.org/search/?q=vtk-developers
>>>>> >>>>>>>>>>>
>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>> >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>>>> >>>>> <CMakeCache.txt>
>>>>
>>>>


More information about the vtk-developers mailing list