[vtkusers] Solving general issues in compiling VTK with Java Wrapping on Windows !

Benoît Thiébault thiebault at artenum.com
Tue Apr 20 04:26:56 EDT 2010


Hi everyone,

I am currently trying to compile VTK 5.4.2 with Java wrapping on Windows and have some problems.

When I first compiled it with Visual C++, the compile version only worked on machines where Visual C++ was installed, which is quite not what I expected :-)

So I followed what Sebastien explained on this list a year ago, installed Embarcadero C++ Builder (previously Borland C++ Builder), converted the jawt.lib library with coff2omf, configured CMake with the Borland Makefile generator and launched the "make" command.

Unfortunately, the compilation ended up at xx% with the following error message (approximately translated from French): 
Embarcadero C++ 6.21 for Win32
C:\vtk-5.4.2\IO\vtkFLUENTReader.cxx 2194: Insufficient memory in vtkFLUENTReader::LoadVariableNames() function

Can anyone tell me what went wrong and how to solve it ?

Thank you
Benoit

P.S.: I attached my CMakeCache.txt file to the mail so you can see my CMake configuration

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeCache.txt.zip
Type: application/zip
Size: 9336 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100420/6a7ba9ca/attachment.zip>
-------------- next part --------------


> Sebastien Jourdain
> Wed May 27 17:16:21 EDT 2009
> 	? Previous message: [vtkusers] Trouble with QVTK
> 	? Next message: [vtkusers] Where should I commit or send code contribution ?
> 	? Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I've finally found a solution to my previous issues where I wanted to  
> produced a VTK for windows with Java wrapping that could work on any  
> Windows of the same kind.
> 
> First of all : Never use Visual Studio Express (any version) if you  
> want to distribute your code. It won't work on the targeted windows if  
> they don't have a Visual Studio Express installed.
> 
> Therefore you have to use a C++ compiler that allow redistribution of  
> the produced binary. I've used the Borland one. But the compilation  
> was not strait forward. I had to convert the file jawt.lib with a tool  
> provided with borland called coff2mof and used the converted file in  
> the CMake for the compilation.
> 
> Once the compilation is done and works locally it has a great chance  
> that it won't work on Windows that don't have C++ tools.
> 
> To solved the portability issue, I've used the "Dependency Walker"  
> tool to look into the dll files and check the missing one. And I've  
> found that the vtkCommon was using the cc3280mt.dll that was on the  
> computer used for the compilation but not on standard Windows. So I've  
> added the file in my VTK package inside the bin directory with the  
> other VTK dll's.
> 
> At this point you are quite close to success ! But, on some computer  
> you might get an error during the loading of the vtkRendering library  
> specially if you use a script that append on the head or at the tail  
> of the PATH the directory that contains the vtk dll before launching  
> your java application.
> 
> To solved this last error I've made a script that override the whole  
> PATH environment variable with only the directory that own the VTK dll  
> and a full path to the java executable of the JRE to execute my  
> application.
> 
> like :
> set PATH=..\vtk
> c:\jre1.6\bin\java -cp .;..\vtk.jar  your.package.name.MainClass
> 
> Instead of :
> set PATH=..\vtk;%PATH%
> java -cp .;..\vtk.jar  your.package.name.MainClass
> 
> And know, it works on all the 5 computer that I could used for my  
> test. Of course I can't guaranty that it is the absolute solution, but  
> right know, for me, it seems to work !
> 
> I would like to thanks Frederic Danesi who give me some good clues on  
> my issues after that I've posted on the VTK mailing list. (He directly  
> replied to me in french ;-)
> 
> So, I hope this could help someone someday...
> 
> Sebastien Jourdain
> 
> 



More information about the vtkusers mailing list