[vtkusers] Java distribution with VTK
James Labiak
jim at jslengineeringsoftware.com
Tue Mar 17 16:13:57 EDT 2015
I used dependency walker and couldn't find any missing MS dlls on the
test machine. Finally I remembered that I already had multiple versions
of MSVC redistributable packages installed on the test machine. The
original errors were that VTK dlls couldn't be found, so I changed my
installer program program to copy the VTK dlls from the
C:\vtk_build\bin\Release directory to the Java application directory,
and now everything works on the test machine (MSVC compiling is set to
"release", and BUILD_SHARED_LIBS is ON). I think that this isn't
violating any license terms, as I will just require that an MSVC
redistributable package be installed prior to my Java program. Then I
don't have to worry about individual MS dlls.
Thanks again for the help,
Jim
On 3/17/2015 11:25 AM, Sebastien Jourdain wrote:
> BUILD_SHARED_LIBS must be ON.
>
> But I think the missing part is providing the MSVC runtime dll.
> If you use dependency walker, you will notice which dll is missing and
> should be provided.
>
> Hope that bring some light,
>
> Seb
>
> On Tue, Mar 17, 2015 at 9:18 AM, James Labiak
> <jim at jslengineeringsoftware.com
> <mailto:jim at jslengineeringsoftware.com>> wrote:
>
> Hi David,
> I cut the VTK dlls out of my Java program.
> First I tried just recompiling VTK with MSVC in release mode; it
> was in debug mode. This caused the Java program to not display
> errors about not finding the VTK dlls, but the VTK portion of the
> program just got stuck. Second, I tried changing CMake
> BUILD_SHARED_LIBS to OFF (it was ON), then recompiled MSVC in
> release mode. MSVC then gave a bunch of errors like below. I'd
> like to go through the compile process instead of using the
> dashboard if possible, unless I'm misunderstanding something.
> Thanks,
> Jim
>
> Error 26 error C2375: 'vtkJavaGetPointerFromObject' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 48 1
> vtkWrappingJava
> Error 27 error C2375: 'vtkJavaMakeJArrayOfDoubleFromDouble'
> : redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 53 1
> vtkWrappingJava
> Error 28 error C2375: 'vtkJavaMakeJArrayOfDoubleFromFloat' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 78 1
> vtkWrappingJava
> Error 29 error C2375: 'vtkJavaMakeJArrayOfIntFromInt' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 103 1
> vtkWrappingJava
> Error 30 error C2375: 'vtkJavaMakeJArrayOfIntFromIdType' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 128 1
> vtkWrappingJava
> Error 31 error C2375: 'vtkJavaMakeJArrayOfIntFromLongLong' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 154 1
> vtkWrappingJava
> Error 32 error C2375: 'vtkJavaMakeJArrayOfIntFromSignedChar'
> : redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 207 1
> vtkWrappingJava
> Error 33 error C2375: 'vtkJavaMakeJArrayOfFloatFromFloat' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 232 1
> vtkWrappingJava
> Error 34 error C2375: 'vtkJavaMakeJArrayOfShortFromShort' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 257 1
> vtkWrappingJava
> Error 35 error C2375:
> 'vtkJavaMakeJArrayOfByteFromUnsignedChar' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 282 1 vtkWrappingJava
> Error 36 error C2375: 'vtkJavaMakeJArrayOfLongFromLong' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 307 1
> vtkWrappingJava
> Error 37 error C2375:
> 'vtkJavaMakeJArrayOfUnsignedLongFromUnsignedLong' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 333 1 vtkWrappingJava
> Error 38 error C2375:
> 'vtkJavaMakeJArrayOfUnsignedShortFromUnsignedShort' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 359 1
> vtkWrappingJava
> Error 39 error C2375:
> 'vtkJavaMakeJArrayOfUnsignedCharFromUnsignedChar' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 385 1 vtkWrappingJava
> Error 40 error C2375:
> 'vtkJavaMakeJArrayOfUnsignedIntFromUnsignedInt' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 411 1 vtkWrappingJava
> Error 41 error C2375: 'vtkJavaMakeJArrayOfCharFromChar' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 437 1
> vtkWrappingJava
> Error 42 error C2375: 'vtkJavaUTFToChar' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 538 1 vtkWrappingJava
> Error 43 error C2375: 'vtkJavaUTFToString' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 543 1 vtkWrappingJava
> Error 44 error C2375: 'vtkJavaMakeJavaString' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 556 1
> vtkWrappingJava
> Error 45 error C2375: 'vtkJavaVoidFunc' : redefinition;
> different linkage C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx
> 569 1 vtkWrappingJava
> Error 46 error C2375: 'vtkJavaVoidFuncArgDelete' :
> redefinition; different linkage
> C:\vtk\vtk-source\Wrapping\Java\vtkJavaUtil.cxx 586 1
> vtkWrappingJava
> Error 59 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\Core\LINK vtkCommonCoreJava
> Error 60 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\System\LINK vtkCommonSystemJava
> Error 61 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\Math\LINK vtkCommonMathJava
> Error 62 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\Misc\LINK vtkCommonMiscJava
> Error 63 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\Transforms\LINK vtkCommonTransformsJava
> Error 64 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\DataModel\LINK vtkCommonDataModelJava
> Error 65 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\Color\LINK vtkCommonColorJava
> Error 66 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\ComputationalGeometry\LINK
> vtkCommonComputationalGeometryJava
> Error 67 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Common\ExecutionModel\LINK vtkCommonExecutionModelJava
> Error 68 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Programmable\LINK vtkFiltersProgrammableJava
> Error 69 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Video\LINK vtkIOVideoJava
> Error 70 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Verdict\LINK vtkFiltersVerdictJava
> Error 71 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\EnSight\LINK vtkIOEnSightJava
> Error 72 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Math\LINK vtkImagingMathJava
> Error 73 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Core\LINK vtkIOCoreJava
> Error 74 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\XMLParser\LINK vtkIOXMLParserJava
> Error 75 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\NetCDF\LINK vtkIONetCDFJava
> Error 76 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Movie\LINK vtkIOMovieJava
> Error 77 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Legacy\LINK vtkIOLegacyJava
> Error 78 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Image\LINK vtkIOImageJava
> Error 79 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Core\LINK vtkImagingCoreJava
> Error 80 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Geometry\LINK vtkIOGeometryJava
> Error 81 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\SQL\LINK vtkIOSQLJava
> Error 82 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Sources\LINK vtkImagingSourcesJava
> Error 83 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Parallel\Core\LINK vtkParallelCoreJava
> Error 84 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Fourier\LINK vtkImagingFourierJava
> Error 85 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Statistics\LINK vtkFiltersStatisticsJava
> Error 86 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Statistics\LINK vtkImagingStatisticsJava
> Error 87 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Color\LINK vtkImagingColorJava
> Error 88 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\General\LINK vtkImagingGeneralJava
> Error 89 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\PLY\LINK vtkIOPLYJava
> Error 90 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Hybrid\LINK vtkImagingHybridJava
> Error 91 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Imaging\LINK vtkFiltersImagingJava
> Error 92 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Morphological\LINK vtkImagingMorphologicalJava
> Error 93 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Core\LINK vtkFiltersCoreJava
> Error 94 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Imaging\Stencil\LINK vtkImagingStencilJava
> Error 95 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\XML\LINK vtkIOXMLJava
> Error 96 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Selection\LINK vtkFiltersSelectionJava
> Error 97 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\LSDyna\LINK vtkIOLSDynaJava
> Error 98 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Geometry\LINK vtkFiltersGeometryJava
> Error 99 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\General\LINK vtkFiltersGeneralJava
> Error 100 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\SMP\LINK vtkFiltersSMPJava
> Error 101 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\AMR\LINK vtkFiltersAMRJava
> Error 102 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Texture\LINK vtkFiltersTextureJava
> Error 103 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\IO\Exodus\LINK vtkIOExodusJava
> Error 104 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\HyperTree\LINK vtkFiltersHyperTreeJava
> Error 105 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Sources\LINK vtkFiltersSourcesJava
> Error 106 error LNK1181: cannot open input file
> '..\..\lib\Release\vtkWrappingJava.lib'
> C:\vtk_build\Filters\Modeling\LINK vtkFiltersModelingJava
>
>
> On 3/16/2015 3:53 PM, David Gobbi wrote:
>> Hi Jim,
>>
>> The windows debug DLLs are not redistributable. This is due to
>> their dependencies (they require the target computer to have MSVC
>> installed) and also due to Microsoft policy/licensing. For
>> redistribution, you should compile in release mode.
>>
>> - David
>>
>> On Mon, Mar 16, 2015 at 1:43 PM, James Labiak
>> <jim at jslengineeringsoftware.com
>> <mailto:jim at jslengineeringsoftware.com>> wrote:
>>
>> Hello all,
>> What is the simplest way to include VTK dlls with a Java
>> program for distribution to Win 7 PCs that don't have VTK
>> installed? Java program uses a .bat file to start. Tried
>> copying the dlls from C:\vtk_build\bin\Debug to the dir
>> ...vtk-libs in the Java program files and including that dir
>> when I set the path in the batch file, but that didn't seem
>> to work.
>> Thanks,
>> Jim
>>
>
>
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150317/c4a7645b/attachment.html>
More information about the vtkusers
mailing list