[vtkusers] VTK 5.0 , ITK 2.4.1 compile errors with cygwin gcc 3.4.4

Stefanie Nowak stefanie.nowak at igd.fraunhofer.de
Fri Jun 30 10:40:48 EDT 2006


Hi Obada,

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?

Thanks,
Stefanie

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'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x1d9):vtkTrivialProducer.cxx: 
undefined reference to `_imp___ZN9vtkObjectdlEPv'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x20d):vtkTrivialProducer.cxx: 
undefined reference to `_imp___ZN9vtkObjectdlEPv'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x45a):vtkTrivialProducer.cxx: 
undefined reference to `_imp___ZN9vtkObjectdlEPv'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x4a6):vtkTrivialProducer.cxx: 
undefined reference to `_imp___ZN9vtkObjectdlEPv'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x4f2):vtkTrivialProducer.cxx: 
undefined reference to `_imp___ZN9vtkObjectdlEPv'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x5bf):vtkTrivialProducer.cxx: 
undefined reference to `vtkObject::GetMTime()'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x851):vtkTrivialProducer.cxx: 
undefined reference to `vtkDebugLeaksManager::vtkDebugLeaksManager()'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x870):vtkTrivialProducer.cxx: 
undefined reference to 
`vtkGarbageCollectorManager::vtkGarbageCollectorManager()'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x88f):vtkTrivialProducer.cxx: 
undefined reference to 
`vtkGarbageCollectorManager::~vtkGarbageCollectorManager()'
CMakeFiles/vtkFiltering.dir/vtkTrivialProducer.obj(.text+0x8ae):vtkTrivialProducer.cxx: 
undefined reference to `vtkDebugLeaksManager::~vtkDebugLeaksManager()'
CMakeFiles/vtkFiltering.dir/vtkUniformGrid.obj(.text+0x16a):vtkUniformGrid.cxx: 
undefined reference to `_imp___ZN16vtkObjectFactory14CreateInstanceEPKc'
CMakeFiles/vtkFiltering.dir/vtkUniformGrid.obj(.text+0x197):vtkUniformGrid.cxx: 
undefined reference to `_imp___ZN9vtkObjectnwEj'
CMakeFiles/vtkFiltering.dir/vtkUniformGrid.obj(.text+0x1d4):vtkUniformGrid.cxx: 
undefined reference to `_imp___ZN9vtkObjectdlEPv'



Obada Mahdi wrote:
> Hi Stefanie!
>
> Stefanie Nowak wrote:
>> I try to compile VTK 5.0 and ITK 2.4.1 under Win32/Cygwin (gcc 3.4.4) 
>> and get a lot of compiler errors.
>> The makefiles are generated by CMake 2.2 using the compiler setting 
>> "UNIX makefiles".
>> Did I miss something in the settings?
>
> As for the first few ITK compiling errors you have quoted, it looks 
> like you have both win32threads and pthreads enabled -- maybe just an 
> oversight?
>
> I am not sure about the errors with VTK, they look similar to what 
> happens if "windows.h" cannot be found (or is just not included).  How 
> did you run CMake and make, from within a cygwin shell or outside?  
> That might affect the way CMake experiences the build environment and 
> determines how to set preprocessor flags.
>
>
> HTH,
>
> Obada
>
>> The first errors by compiling VTK 5.0
>>
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:141: error: 
>> `wndClass' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:141: error: 
>> `GetClassInfo' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:144: error: 
>> `CS_HREDRAW' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:144: error: 
>> `CS_VREDRAW' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:145: error: 
>> `vtkWin32OutputWindowWndProc' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:149: error: 
>> `IDI_APPLICATION' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:149: error: 
>> `LoadIcon' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:151: error: 
>> `IDC_ARROW' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:151: error: 
>> `LoadCursor' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:152: error: 
>> `HBRUSH' undeclared (first use this function)
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:152: error: 
>> expected `;' before "GetStockObject"
>> D:/VTK_gcc/VTK-5.0.0/Common/vtkWin32OutputWindow.cxx:162: error: 
>> `RegisterClass' undeclared (first use this function)
>>
>> The first errors by compiling ITK 2.4.1
>>
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:116: 
>> error: 'itk::ThreadFunctionType' has a previous declaration as 
>> `typedef void*(*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:123: 
>> error: conflicting declaration 'typedef DWORD 
>> (*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:116: 
>> error: 'itk::ThreadFunctionType' has a previous declaration as 
>> `typedef void*(*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:123: 
>> error: declaration of `typedef DWORD (*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:116: 
>> error: conflicts with previous declaration `typedef 
>> void*(*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:123: 
>> error: declaration of `typedef DWORD (*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:116: 
>> error: conflicts with previous declaration `typedef 
>> void*(*itk::ThreadFunctionType)(void*)'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:124: 
>> error: conflicting declaration 'typedef void*itk::ThreadProcessIDType'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:117: 
>> error: 'itk::ThreadProcessIDType' has a previous declaration as 
>> `typedef struct __pthread_t*itk::ThreadProcessIDType'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:124: 
>> error: declaration of `typedef void*itk::ThreadProcessIDType'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:117: 
>> error: conflicts with previous declaration `typedef struct 
>> __pthread_t*itk::ThreadProcessIDType'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:124: 
>> error: declaration of `typedef void*itk::ThreadProcessIDType'
>> D:/ITK_gcc/InsightToolkit-2.4.1/Code/Common/itkMultiThreader.h:117: 
>> error: conflicts with previous declaration `typedef struct 
>> __pthread_t*itk::ThreadProcessIDType'


-- 

---------------------------------------------------------------------
Dipl.-Inform. Stefanie Nowak

Fraunhofer Institute for Computer Graphics
Cognitive Computing and Medical Imaging (A7)
Fraunhoferstr. 5, 64283 Darmstadt, Germany
---------------------------------------------------------------------
email:    stefanie.nowak at igd.fraunhofer.de
http://a7www.igd.fhg.de/persons/snowak/

phone:	+49 6151 - 155 520
fax:    +49 6151 - 155 480
--------------------------------------------------------------------- 




More information about the vtkusers mailing list