[vtkusers] Compile errors in threads.c

Sascha Zelzer s.zelzer at dkfz-heidelberg.de
Sat Aug 28 09:15:40 EDT 2010


Hi,

you should disable either CMAKE_USE_PTHREADS or CMAKE_USE_WIN32THREADS. 
By default, they are both enabled which leads to a conflict.

Best,
Sascha

On 08/28/2010 12:06 PM, Gib Bogle wrote:
> Hi, I'm trying to build VTK 5.6 using MinGW 4.4.  There are several
> errors when compiling threads.c:
>
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function
> 'vtk_libxml2_xmlRMutexUnl
> ock':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:399: error: incompatible
> types when as
> signing to type 'pthread_t' from type 'int'
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function
> 'vtk_libxml2_xmlGetThread
> Id':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:624: error: aggregate value
> used where
>    an integer was expected
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function
> 'vtk_libxml2_xmlIsMainThr
> ead':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:660: error: invalid operands
> to binary
>    == (have 'pthread_t' and 'pthread_t')
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function 'xmlOnceInit':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: 'run_once'
> undeclared (fir
> st use in this function)
> C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: (Each undeclared
> identifie
> r is reported only once
> C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: for each
> function it appea
> rs in.)
> C:\VTK-src\Utilities\vtklibxml2\threads.c:796: error: incompatible
> types when as
> signing to type 'pthread_t' from type 'DWORD'
> mingw32-make[2]: ***
> [Utilities/vtklibxml2/CMakeFiles/vtklibxml2.dir/threads.c.o
> bj] Error 1
> mingw32-make[1]: ***
> [Utilities/vtklibxml2/CMakeFiles/vtklibxml2.dir/all] Error
> 2
> mingw32-make: *** [all] Error 2
>
> Is there a way around this problem?
>
> Thanks
> Gib
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>    




More information about the vtkusers mailing list