Please add -std=c++11 to CXXFLAGS
Opened this issue · 3 comments
yurivict commented
Some systems have compilers that don't have C++11 enabled by default.
tbaudier commented
Hi yurivict,
vv can be compiled without c++11 flags. Why do you want me to add the flag?
Thank you
yurivict commented
Build fails without this flag:
In file included from /wrkdirs/usr/ports/graphics/vv/work/vv-1.4.0-271-g24b75af3/tools/clitkHistogramImageGenericFilter.cxx:30:
In file included from /wrkdirs/usr/ports/graphics/vv/work/vv-1.4.0-271-g24b75af3/tools/clitkHistogramImageGenericFilter.h:26:
In file included from /usr/local/include/vtk-8.1/vtkIntArray.h:33:
In file included from /usr/local/include/vtk-8.1/vtkAOSDataArrayTemplate.h:35:
In file included from /usr/local/include/vtk-8.1/vtkGenericDataArray.h:72:
/usr/local/include/vtk-8.1/vtkGenericDataArrayLookupHelper.h:72:31: error: expected member name or ';' after declaration specifiers
: AssociatedArray{nullptr}, SortedArray(nullptr),
^
/usr/local/include/vtk-8.1/vtkGenericDataArrayLookupHelper.h:176:60: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
void operator=(const vtkGenericDataArrayLookupHelper&) = delete;
^
/usr/local/include/vtk-8.1/vtkGenericDataArrayLookupHelper.h:72:22: error: expected '('
: AssociatedArray{nullptr}, SortedArray(nullptr),
^
/usr/local/include/vtk-8.1/vtkGenericDataArrayLookupHelper.h:72:30: error: expected ';' after expression
: AssociatedArray{nullptr}, SortedArray(nullptr),
^
;
tbaudier commented
Hi yurivict,
You have this error because you compiled VTK and ITK with the c++11 flags. For the latest versions, it's automatically. I do not find a solution to check if VTK or ITK were compiled with c++11 with a CMake flag for example.
I do not want to add it automatically for older gcc version.
So, you can add -std=c++11 with cmake to enable it.
Thank you
Thomas