[vtkusers] [-Winconsistent-missing-override] after new VTK build

Shawn Waldon shawn.waldon at kitware.com
Thu Oct 20 09:49:38 EDT 2016


Hi BBerco,

VTK has started conditionally using override when C++11 is enabled with the
VTK_OVERRIDE macro.  But we haven't done a sweep that converts everything
to use it yet.  Some compilers (clang) have made the decision that if your
codebase uses override anywhere, then it should use it everywhere.  And it
warns when there is an override keyword missing.  So you could either not
build with C++11 or figure out how to get clang to ignore the VTK headers
in your project.  I think it may be as simple as including them with <>
rather than "" in your project, but I'm not sure.  Also, if you are
building your project with C++11, you will want to make sure that VTK is
built with C++11 too (and I think you should have seen these warnings in
VTK's build if you did but maybe that warning wasn't on).

HTH,
Shawn

On Wed, Oct 19, 2016 at 7:07 PM, BBerco <bebe0705 at colorado.edu> wrote:

> Hi all,
> I just retrieved the latest tarball of VTK at
> https://gitlab.kitware.com/vtk/vtk and built it with
>
> *
> cmake  ../../vtk/ -G "Unix Makefiles"
> -DCMAKE_PREFIX_PATH:PATH=/Users/me/Qt/5.6/clang_64/ -DVTK_USE_QVTK:BOOL=ON
> -DCMAKE_INSTALL_PREFIX=/usr/local -DVTK_USE_GUISUPPORT:BOOL=ON
> -DQT_QMAKE_EXECUTABLE:PATH=~/Qt/5.6/clang_64/bin/qmake
> -DVTK_Group_Qt:BOOL=ON -DVTK_QT_VERSION:STRING=5
> *
> followed by *make*. The library built without warnings, but I am now
> getting
> hundreds of warnings pertaining to a function definition mismatch ( as the
> *[-Winconsistent-missing-override]*
>  flag appears everywhere in the error log).
>
> Attached is the output of stderr collected when building my application.
> Attached is also the CMakeLists.txt of my application. Note the
> *add_definitions(-Wall)*, which used to stay quiet until I moved to the
> newest version of VTK.
>
> Any help is appreciated to solve this mysterious case, thanks!
>
> Error log <https://drive.google.com/open?id=0Bzf79yzZcPJJTkttM3lHMENJVzA>
>
> CMakeLists.txt
> <https://drive.google.com/open?id=0Bzf79yzZcPJJc21FTGZNVUZZaVU>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.
> com/Winconsistent-missing-override-after-new-VTK-build-tp5740852.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161020/04243d24/attachment.html>


More information about the vtkusers mailing list