[vtkusers] VTK cvs compile errors - reserved words near & far

Anka Kochanowska pluszcz at gmail.com
Mon Jan 18 12:30:07 EST 2010


Hi!
In ANSI C++ the underscore is reserved for system variables, it would
be better to use nearSomething and farSometing .

Anka


On Mon, Jan 18, 2010 at 11:44 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Mon, Jan 18, 2010 at 11:41 AM, Francois Bertel
> <francois.bertel at kitware.com> wrote:
>> Hello,
>>
>> I don't where you found those near and far things in
>> vtkShadowMapPass.*. There is no such thing. In addition,
>> vtkShadowMapPass is part of vtkRendering package which is built every
>> night on Windows and I never saw such error reported on the VTK
>> dashboard.
>>
>> Are sure about the name of the file you are talking about?
>>
>> On Mon, Jan 18, 2010 at 11:23 AM, Dean Inglis <dean.inglis at camris.ca> wrote:
>>> Im updating my VTK build to the latest cvs and I am
>>> running into a slew of fatal syntax errors that are caused by the use of
>>> "near" and "far" in vtkShadowMapPass.cxx.  These variable names are already
>>> #defined in windef.h.
>>> Im using VS Express 2005 static build on Win32 Vista.  Changing (for
>>> example) "near" to "_near" and "far" to "_far" resolves the issues.  Any
>>> suggestions on a better fix than
>>> prepending with "_" ?
>>>
>>> Dean
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> --
>> François Bertel, PhD  | Kitware Inc. Suite 204
>> 1 (518) 371 3971 x113 | 28 Corporate Drive
>>                      | Clifton Park NY 12065, USA
>> _______________________________________________
>> 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
>>
>
> I got a report from CDash complaining about this:
>
> http://www.cdash.org/CDash/viewBuildError.php?type=0&buildid=517845
>
> Lines 102 and 103 of vtkShadowMapPass.cxx are
>    near = (dot < near ? dot : near);
>    far = (dot > far? dot:far);
>
> Thanks,
>
> David
> _______________________________________________
> 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