[vtkusers] incorrect shared library names using cmake-gui with MSYS or MINGW32.
Jim Peterson
jimcp at cox.net
Wed Jul 28 14:32:02 EDT 2010
All,
I had used VTK in the mid 90's from java applications on a WIN98
platform using the Borland 4 compiler to prepare the VTKJAVA.DLL and
required shared libraries. I am now attempting to build VTK 5.6.0 using
mingw with or without Eclipse to do similar processing. My problem is
the CMAKE makefiles appear to generate DLL names prefixed with "lib" for
both the Java interface DLLs and shared libraries that the Java DLLs
use. It appears the generated logic in the Java DLL/s is attempting to
load libraries without the lib prefix. and if I rename all of the output
libraries, some (presumably linker references) are mis matched.
To clarify the issue, I can use the CMAKE-GUI to specify shared
libraries and Java wrappers for the downloaded source. I have specified
both MSYS and MINGW32 with the same result. in all cases the
documentation and java examples appear to expect windows output
libraries named like vtkCommon.dll and vtkCommonJava.dll. what I am
getting from the CMAKE-GUI Generate is libvtkCommon.dll and
libvtkCommonJava.dll. The effect appears to be a mix of both the UNIX
style lib prefix on the name and the Win32 .dll suffix.
I did try changing the java System.loadLibrary parameter from
"vtkCommonJava" to "libvtkCommonJava.dll, but this then failed to load
the internal functions vtkCommon.dll. I tried renaming libvtkCommon.dll
to vtkCommon.dll (et al) and got a VTKINIT null pointer exception. I
suspect all this is the result of the naming mismatch.
Has anyone experienced something similar? I did look briefly at the
dashboards, and I cannot see where the win32 wrappers generated using
MSYS or MINGW32 are actually tested with java, so this may have been a
windows wrapper problem, however, the fact that the shared libraries are
also misnamed may mean the Visual Studio output is correct and only the
GNU compiler output is affected.
Thanks for any insight.
Jim Peterson
More information about the vtkusers
mailing list