[vtkusers] Building VTK with MinGW

William A. Hoffman billlist at nycap.rr.com
Wed Oct 15 09:20:18 EDT 2003


You may want to try static libraries.  I have successfully built VTK with
mingw but only with static libraries.  We just discovered a bug with the
current CMake that will cause mingw builds not to work.  To get around that
bug you need to install cmake in a directory with no spaces in the path.
So, the default Program Files will not work.   This will be fixed in cmake
1.8.2. 

You should never have to manually edit the cmake generated makefiles.
You may have run into the spaces problem.   I will look into the dll problem,
but for now, I would say they are not supported.



-Bill


At 05:41 PM 10/14/2003, Brett Simmers wrote:
>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
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list