[vtkusers] VTK 5.0 , ITK 2.4.1 compile errors with cygwin gcc 3.4.4
Obada Mahdi
omahdi at gmx.de
Mon Jul 3 17:07:35 EDT 2006
Hi Stefanie!
Stefanie Nowak wrote:
> I tried different things to compile the ITK and VTK.
> You were right that both were enabled the win32threads and the pthreads
> for ITK. By only changing this, I could not compile, but by using MinGW
> instead of cygwin and starting the Cmake from the MinGW shell compiling
> the ITK works.
>
> But I have still problems to compile VTK. I started CMake from the MinGW
> shell, but still get errors. I think that there is still a wrong flag in
> the CMake.
> I integrated VTK as a project in eclipse and ran make from there.
> Have you (or anybody else) an idea on what to pay attention to?
This seems to be a different problem with building VTK than the one you
reported before; it occurs later in the build process, apparently while
trying to link a shared library. There can be a number of reasons for
this, including:
- missing or misplaced "-lvtkCommon" flag to the linker
- the vtkCommon.dll.a import library somehow has been created with a
different compiler/linker
To help diagnose the problem, could you please provide a copy of your
"CMakeCache.txt" (from the VTK build directory) and, from the build
output, at least the line containing the link command? To see the
latter, CMAKE_VERBOSE_MAKEFILE has to be enabled. The line should
contain something like
"[...] c++ -shared -Wl,--out-implib,../bin/libvtkFiltering.dll.a [...]",
along with a long list of object files and some additional linker flags.
Also, when in doubt, you should always make sure to build in a fresh or
cleaned (make clean) build directory, to prevent stale object files or
libraries from getting in the way.
Regards
Obada
> The first VTK errors:
>
> CMakeFiles/vtkFiltering.dir/vtkTriangleStrip.obj(.text+0x538):vtkTriangleStrip.cxx:
> undefined reference to `_imp___ZN9vtkObjectdlEPv'
> CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x172):vtkTrivialProducer.cxx:
> undefined reference to `_imp___ZN16vtkObjectFactory14CreateInstanceEPKc'
> CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x19c):vtkTrivialProducer.cxx:
> undefined reference to `_imp___ZN9vtkObjectnwEj'
[...]
More information about the vtkusers
mailing list