[vtkusers] Changes to jmorecfg.h to make Windows DLL (MinGW)

Martin Baumann mailsgetlost at web.de
Sat Feb 11 18:36:58 EST 2006


Hi,

I have problems linking VTK-5.0 with MinGW as shared libraries. 

At linking time I get:
  Linking CXX shared library ../bin/libvtkRendering.dll
  Info: resolving vtable for vtkPropCollectionby linking to __imp___ZTV17vtkPropCollection (auto-import)
  Info: resolving vtable for vtkSimpleCriticalSectionby linking to __imp___ZTV24vtkSimpleCriticalSection (auto-import)
  Info: resolving vtable for vtkMapper2Dby linking to __imp___ZTV11vtkMapper2D (auto-import)
  CMakeFiles/vtkRendering.dir/vtkTesting.obj(.text+0x1d0d):vtkTesting.cxx: undefined reference to `vtkPNGWriter::New()'
  CMakeFiles/vtkRendering.dir/vtkTesting.obj(.text+0x2b7b):vtkTesting.cxx: undefined reference to `vtkJPEGWriter::New()'
  CMakeFiles/vtkRendering.dir/vtkTesting.obj(.text$_ZN15vtkSmartPointerI12vtkPNGReaderE3NewEv[vtkSmartPointer<vtkPNGReader>::New()]+0xb):vtkTesting.cxx: undefined reference to `vtkPNGReader::New()'
  collect2: ld returned 1 exit status
  make[2]: *** [bin/libvtkRendering.dll] Error 1
  make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] Error 2
  make: *** [all] Error 2

Does anyone have experience with that?

I guess that in jmorecfg.h (part of Utilities/vtkjpeg) changes need to be done. Also in pngconf.h (part of Utilities/vtkpng).
Vincent Nicolas helped me with a similar problem: it was due to dll export/import directives. These made problems with gcc as a linker. Therefore changes were made so that no symbols exports were declared. This worked in the case of the 'Common'-part of VTK.


Regards,

MB
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the vtkusers mailing list