[vtkusers] Build VTK using MinGW / MSys

J.vanderLaak at pathol.umcn.nl J.vanderLaak at pathol.umcn.nl
Tue Apr 4 09:42:20 EDT 2006


Hi all,
Currently I'm trying to build VTK on Windows 2000 as a dynamic library
(DLL), using MinGW (with/without Msys). I'm using Cmake 2.3, which
is capable of generating makefiles for both MinGW and Msys. If I
generate MinGW makefiles and try to build VTK from a (Windows) command
prompt, I end up with an error because the link command exceeds windows
maximum line length. Using Cmake to generate Msys makefiles (for
use in sh.exe) results in a series of linker errors 'undefined
reference':

Creating library file: ../bin/libvtkFiltering.dll.a
CMakeFiles/vtkFiltering.dir/vtkCellLocator.obj(.text$_ZN11vtkIntArray11I
nsertValueEii[vtkIntArray::InsertValue(int,
int)]+0x1b):vtkCellLocator.cxx:
undefined reference to `vtkDataArrayTemplate<int>::InsertValue(int,
int)'
CMakeFiles/vtkFiltering.dir/vtkCellLocator.obj(.text$_ZN14vtkIdTypeArray
12WritePointerEii[vtkIdTypeArray::WritePointer(int, int)]+
0x1b):vtkCellLocator.cxx: undefined reference to
`vtkDataArrayTemplate<int>::WritePointer(int, int)'
Etc etc

I found two possible solutions to this in the mailing list archive,
which both don't seem to work for me:
- I changed D:\VTK\Source\Common\vtkWin32header.h so that defines
'VTK_xxx_EXPORT' are no longer defined as __declspec(dllexport)
- I used linker flag '--exprt-all-symbols' to export all symbols

Anyone knows this problem (or better: the solution to it ;-) ???

Regards,
Jeroen



More information about the vtkusers mailing list