[vtkusers] vtkDataArrayTemplate.txx 64 bit error

Flaviu2 flaviu2 at yahoo.com
Mon Sep 4 05:28:46 EDT 2017


 Kindly thank you for your hint. Yes, I have tried what you said, and now I have another errors, but I am sure that I am not far to solve my problem:
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(470) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(471) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(472) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(473) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(494) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(495) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(496) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(497) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(658) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(659) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(660) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(661) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(682) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(683) : error C3861: 'max': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(684) : error C3861: 'min': identifier not found
1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(685) : error C3861: 'min': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxtoolbar.h(166) : error C3861: 'max': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxmenubar.h(160) : error C3861: 'max': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxdesktopalertwnd.h(81) : error C3861: 'max': identifier not found

if I will get rid of these errors, I am sure that my app will run ... can you tell me what could be the problem ?

    On ‎Friday‎, ‎September‎ ‎01‎, ‎2017‎ ‎07‎:‎05‎:‎28‎ ‎PM‎ ‎EEST, Allie Vacanti <allison.vacanti at kitware.com> wrote:  
 
 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170904/ed7ecbf6/attachment.html>


More information about the vtkusers mailing list