[vtkusers] vtkDataArrayTemplate.txx 64 bit error

Allie Vacanti allison.vacanti at kitware.com
Fri Sep 1 12:05:05 EDT 2017


The line it's failing on is

maxDstId = std::max(maxDstId, dstIds->GetId(idIndex));

I suspect the error is due to MSVC's decision to define macros that
use the identifiers 'min' and 'max'. Try adding "-DNOMINMAX" to your
compiler flags. See
https://stackoverflow.com/questions/5004858/stdmin-gives-error for
more info.

HTH,
Allie

On Fri, Sep 1, 2017 at 7:14 AM, Flaviu2 via vtkusers <vtkusers at vtk.org> wrote:
> Maybe is not so big deal, maybe it is just a stroke through some option ...
> which I didn't founded ...
>
> On ‎Friday‎, ‎September‎ ‎01‎, ‎2017‎ ‎01‎:‎41‎:‎17‎ ‎PM‎ ‎EEST, Flaviu2 via
> vtkusers <vtkusers at vtk.org> wrote:
>
>
> Hi VTK users. I encountered an strange error, willing to compile my MFC
> project which have VTK inside.
>
> I am using VTK 6.1, in an VS2008 project, on Win10.
>
> The project work fine compiled on 32 bit, with VTK 6.1 compiled on 32 bit.
> Soon as I have compiled my project on 64 bit (and also VTK on 64), I get the
> following errors:
>
> 1>MainFrm.cpp
> 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error
> C2589: '(' : illegal token on right side of '::'
> 1>        c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454)
> : while compiling class template member function 'void
> vtkDataArrayTemplate<T>::InsertTuples(vtkIdList *,vtkIdList
> *,vtkAbstractArray *)'
> 1>        with
> 1>        [
> 1>            T=unsigned char
> 1>        ]
> 1>        c:\program files\vtk\include\vtk-6.1\vtkUnsignedCharArray.h(41) :
> see reference to class template instantiation 'vtkDataArrayTemplate<T>'
> being compiled
> 1>        with
> 1>        [
> 1>            T=unsigned char
> 1>        ]
> 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error
> C2059: syntax error : '::'
> 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error
> C2589: '(' : illegal token on right side of '::'
> 1>        c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454)
> : while compiling class template member function 'void
> vtkDataArrayTemplate<T>::InsertTuples(vtkIdList *,vtkIdList
> *,vtkAbstractArray *)'
> 1>        with
> 1>        [
> 1>            T=int
> 1>        ]
> 1>        c:\program files\vtk\include\vtk-6.1\vtkIntArray.h(41) : see
> reference to class template instantiation 'vtkDataArrayTemplate<T>' being
> compiled
> 1>        with
> 1>        [
> 1>            T=int
> 1>        ]
> 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error
> C2059: syntax error : '::'
>
> Do you experienced with this error ? Or, can you tell me what if the cause
> of this strange error ? And how can I solve this ?
>
> Thank you.
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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