[vtkusers] Error Compile VTK in the MinGW

David Cole david.cole at kitware.com
Sat Mar 22 13:08:43 EDT 2008


This was recently fixed in the CVS HEAD of VTK.
In the file "VTK/Utilities/vtkjpeg/jconfig.h" you should see this block of
code in VTK 5.0.4:

#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
/* Define "boolean" as unsigned char, not int, per Windows custom */
/* don't conflict if rpcndr.h already read; Note that the w32api headers
   used by Cygwin and Mingw do not define "boolean", so jmorecfg.h
   handles it later. */
#ifndef __RPCNDR_H__
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN            /* prevent jmorecfg.h from redefining it */
#endif


Replace that entire block with this block of code:

#if defined(_WIN32) || defined(__CYGWIN__)
/* typedef "boolean" as unsigned char to match rpcndr.h */
typedef unsigned char boolean;
#define HAVE_BOOLEAN    /* prevent jmorecfg.h from typedef-ing it as int */
#endif


Please "reply all" to this email and let us know if that works for you. If
it does, I will get this change merged into the VTK-5-0 branch next week.


Thanks, (and hope this helps!),
David Cole
Kitware, Inc.


On Sat, Mar 22, 2008 at 11:20 AM, Paulo Henrique Junqueira Amorim <
paulojamorim at gmail.com> wrote:

> Hello All,
>
> I am compiling VTK 5.0.4 to Pythoin in the MinGW 5.0.0 But made mistakes.
>
> [ 60%] Building C object
> Utilities/vtkjpeg/CMakeFiles/vtkjpeg.dir/jquant1.obj
> [ 60%] Building C object
> Utilities/vtkjpeg/CMakeFiles/vtkjpeg.dir/jquant2.obj
> Linking C shared library ../../bin/libvtkjpeg.dll
> Creating library file: ../../bin/libvtkjpeg.dll.a
> [ 60%] Built target vtkjpeg
> [ 60%] Building C object
> Utilities/vtktiff/CMakeFiles/vtktiff.dir/tif_jpeg.obj
> In file included from
> C:/DOCUME~1/Usuario/Desktop/wrapper/VTK-50~1.4/VTK/UTILIT~1/vtkjpeg/jpeglib.h:27,
>                  from
> C:/DOCUME~1/Usuario/Desktop/wrapper/VTK-50~1.4/VTK/UTILIT~1/vtk_jpeg.h:35,
>                  from C:\Documents and
> Settings\Usuario\Desktop\wrapper\vtk-
> 5.0.4\VTK\Utilities\vtktiff\tif_jpeg.c:52:
> C:/DOCUME~1/Usuario/Desktop/wrapper/VTK-50~1.4/VTK/UTILIT~1/vtkjpeg/jmorecfg.h:247:
> error: conflicting types for 'boolean'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcndr.h:52:
> error: previous declaration of 'boolean' was here
> mingw32-make[2]: ***
> [Utilities/vtktiff/CMakeFiles/vtktiff.dir/tif_jpeg.obj] Error 1
> mingw32-make[1]: *** [Utilities/vtktiff/CMakeFiles/vtktiff.dir/all] Error
> 2
> mingw32-make: *** [all] Error 2
>
>
>
> Regards,
> Paulo Amorim
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080322/d82f5d86/attachment-0003.htm>


More information about the vtkusers mailing list