[vtkusers] Re: VTK+java built on MinGW: recent experience?

Steve M. Robbins steve at sumost.ca
Sun Jan 21 23:19:29 EST 2007


Hello Erik,

I hope you don't mind me answering this on the VTK list.


On Fri, Jan 19, 2007 at 01:46:54PM +0100, Erik Meijering wrote:

> Today I was trying to build VTK+Java on MinGW (I'm using the latest 
> versions of all) and ran into problems. When I searched the web for 
> solutions I found your post on the vtkusers list. I haven't managed yet 
> to finish building VTK but it seems I'm encountering the exact same 
> series of problems that you mention.
> 
> I was wondering if you got any response to your post, which may be of 
> help before I continue. 

I had received zero responses until yours.  But then I got a second,
similar query mere hours later.  This is why I'm posting the answers
publicly.



> In any case, I wanted to ask you about some 
> details of the work-arounds you mention.
> 
> Specifically:
> 
> Point 2: "The next thing was a redefinition of "boolean".  This is 
> defined in Utilities/vtkjpeg/jmorecfg.h as an int, but <rpcndr.h> as a 
> char. It turns out that inclusion of <rpcndr.h> can be suppressed by 
> defining the C preprocessor symbol WIN32_LEAN_AND_MEAN."
> 
> Where, exactly, do you define this symbol?

I did it in cmake.  Switch to advanced view and edit the
following variables:

 CMAKE_CXX_FLAGS                  -DWIN32_LEAN_AND_MEAN
 CMAKE_C_FLAGS                    -DWIN32_LEAN_AND_MEAN



> Point 3: I would be really interested in the solution to the lib naming 
> problem. Changing the calls to System.loadLibrary in my code is not 
> really an option as I want to release my program and so I want to use 
> the standard (correct) file names.

I agree.  However: just after my post in December, I put that project
on hold so I have not been pursuing it.


 
> Point 4: Where, exactly, do you specify the --add-stdcall-alias flag?

Again in cmake.  Switch to advanced view and edit the following
variables:

 CMAKE_SHARED_LINKER_FLAGS        -Wl,-add-stdcall-alias


Hope this helps,
-Steve



More information about the vtkusers mailing list