[vtkusers] VTK compiling error with MinGW-w64: "cast loses precision"

Chaffra Affouda chaffra at gmail.com
Fri Sep 18 11:30:12 EDT 2015


Hi Nirhal,

  I had a similar error but this should have been fixed in the trunk. 
line 2348 should read

if (!this->GetGlyphIndex(reinterpret_cast<size_t>(scaler->face_id), c,
                            &gindex))

If not you need to pull from the trunk.

Chaffra


On 9/18/2015 11:02 AM, nirhal wrote:
> Hi,
>
> I'm trying to compile VTK 6.3 (from git) using MinGW-w64.
> During the comilation i'm getting this error:
>
> C:\libs\VTK\VTK\Rendering\FreeType\vtkFreeTypeTools.cxx: In member function
> 'FT_
> Bitmap* vtkFreeTypeTools::GetBitmap(FT_UInt32, FTC_Scaler, FT_UInt&,
> FT_BitmapGl
> yphRec_*&)':
> C:\libs\VTK\VTK\Rendering\FreeType\vtkFreeTypeTools.cxx:2348:75: error: cast
> fro
> m 'FTC_FaceID {aka void*}' to 'long unsigned int' loses precision
> [-fpermissive]
>
>     if (!this->GetGlyphIndex(reinterpret_cast<unsigned
> long>(scaler->face_id), c,
>
>                                                                             ^
> C:\libs\VTK\VTK\Rendering\FreeType\vtkFreeTypeTools.cxx: In member function
> 'FT_
> Outline* vtkFreeTypeTools::GetOutline(FT_UInt32, FTC_Scaler, FT_UInt&,
> FT_Outlin
> eGlyphRec_*&)':
> C:\libs\VTK\VTK\Rendering\FreeType\vtkFreeTypeTools.cxx:2410:75: error: cast
> fro
> m 'FTC_FaceID {aka void*}' to 'long unsigned int' loses precision
> [-fpermissive]
>
>     if (!this->GetGlyphIndex(reinterpret_cast<unsigned
> long>(scaler->face_id), c,
>
>
> What should i do?
>
> Thanks
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/VTK-compiling-error-with-MinGW-w64-cast-loses-precision-tp5734017.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



More information about the vtkusers mailing list