[vtkusers] C++ 11 compiler issues with Makefile generate using cmake

Chiranjib Sur sur.chiranjib at gmail.com
Wed Aug 3 06:00:36 EDT 2016


Hi,
In my C++ code I am initialising my data members in the header file
(example below)

class foo{
public:
 int myInt =0;
....
}

When I create the Makefile using cmake, and try to compile the compiler
trows an error that

 error: ISO C++ forbids initialization of member ?myInt?

I am using the "-std=c++0x" flag in my CMakeLists.txt file.

This is a standard feature and I am puzzled why the compiler is complaining
with the CMake generate Makefile.

Any expert comments?

Thanks,
Chiranjib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160803/69e93280/attachment.html>


More information about the vtkusers mailing list