[vtkusers] Building VTK with MinGW

Brett Simmers swtaarrs at comcast.net
Tue Oct 14 17:41:01 EDT 2003


Hello,

I've successfully built VTK with msvc.net 2003, and now I'm trying to 
build it with Mingw (3.3.1).  I've searched these mailing lists and 
google, and it looks like the best way is to use CMakeSetup to generate 
Unix makefiles, so that's what I'm doing.  After manually editing some 
of the generated makefiles, I managed to get all of the dlls in the 
"Utilities" folder (zlib, jpg, tiff, etc) and vtkCommon.dll built, but I 
get all sorts of undefined reference errors while linking 
vtkFiltering.dll.  Here are a few lines, the total is many hundreds of 
lines:

Building shared library 
C:/cygwin/home/Brett/mingw/vtk-build/bin/vtkFiltering.dll...
vtkCardinalSpline.o(.text+0xc3):vtkCardinalSpline.cxx: undefined 
reference to `_
imp___ZN16vtkObjectFactory14CreateInstanceEPKc'
vtkCardinalSpline.o(.text+0xe9):vtkCardinalSpline.cxx: undefined 
reference to `_
imp___ZN9vtkObjectnwEj'
vtkCardinalSpline.o(.text+0x2cf):vtkCardinalSpline.cxx: undefined 
reference to `
_imp___ZN9vtkObject23GetGlobalWarningDisplayEv'
vtkCardinalSpline.o(.text+0x3bf):vtkCardinalSpline.cxx: undefined 
reference to `
_imp___ZN9vtkObject11HasObserverEPKc'
vtkCardinalSpline.o(.text+0x436):vtkCardinalSpline.cxx: undefined 
reference to `
_imp___ZN9vtkObject12BreakOnErrorEv'
vtkCardinalSpline.o(.rdata$_ZTV17vtkCardinalSpline+0x20):vtkCardinalSpline.cxx: 

undefined reference to `vtkObject::UnRegister(vtkObjectBase*)'
vtkCardinalSpline.o(.rdata$_ZTV17vtkCardinalSpline+0x34):vtkCardinalSpline.cxx: 

undefined reference to `vtkObject::DebugOn()'
vtkCardinalSpline.o(.rdata$_ZTV17vtkCardinalSpline+0x38):vtkCardinalSpline.cxx: 

undefined reference to `vtkObject::DebugOff()'
vtkCardinalSpline.o(.rdata$_ZTV17vtkCardinalSpline+0x3c):vtkCardinalSpline.cxx: 

undefined reference to `vtkObject::Modified()'
vtkCardinalSpline.o(.rdata$_ZTV17vtkCardinalSpline+0x44):vtkCardinalSpline.cxx: 

undefined reference to `vtkObject::Register(vtkObjectBase*)'
vtkCardinalSpline.o(.text$_ZN9vtkSpline13SetClampValueEi+0x43):vtkCardinalSpline 

.cxx: undefined reference to 
`_imp___ZN9vtkObject23GetGlobalWarningDisplayEv'
vtkCardinalSpline.o(.text$_ZN9vtkSpline13GetClampValueEv+0x43):vtkCardinalSpline 

.cxx: undefined reference to 
`_imp___ZN9vtkObject23GetGlobalWarningDisplayEv'
vtkCardinalSpline.o(.text$_ZN9vtkSpline9SetClosedEi+0x43):vtkCardinalSpline.cxx: 

undefined reference to `_imp___ZN9vtkObject23GetGlobalWarningDisplayEv'
vtkCardinalSpline.o(.text$_ZN9vtkSpline9GetClosedEv+0x43):vtkCardinalSpline.cxx: 

undefined reference to `_imp___ZN9vtkObject23GetGlobalWarningDisplayEv'
vtkCardinalSpline.o(.text$_ZN9vtkSpline17SetLeftConstraintEi+0x46):vtkCardinalSp 

line.cxx: undefined reference to 
`_imp___ZN9vtkObject23GetGlobalWarningDisplayEv'

Anyway, the impression I got from these errors was that vtkCommon.a (or 
similar) was supposed to be built for linking the other dlls, but it 
doesn't exist (there aren't any *.a files at all in my vtk directory).  
Does anyone know how I could manually build the library?  I've tried a 
few little things but nothing has worked.

Thanks,
Brett Simmers
swtaarrs at comcast.net




More information about the vtkusers mailing list