[Insight-developers] compilation error when compiled with gnu++0x flag

Arnaud Gelas arnaudgelas at gmail.com
Wed May 9 09:00:33 EDT 2012


So, does it mean CMake try_compiles are ran once even though you may 
have added/removed definitions?

On 05/09/2012 02:43 PM, Bradley Lowekamp wrote:
> Yes, I think that is the reason. CMake try_compiles are done for that 
> section of code. Essentially adding the -std=gnu++0x changes the 
> compiler you are using to support a different language.
>
> Brad
>
> On May 9, 2012, at 8:36 AM, Arnaud Gelas wrote:
>
>> Hi Brad,
>>
>> ITK was not compiled when I tried this...
>> The only thing, I did is to configure once the project without the 
>> definitions, and a second time with the definitions.
>>
>> Could that be the reason?
>>
>> Thanks,
>> Arnaud
>>
>> On 05/09/2012 02:31 PM, Bradley Lowekamp wrote:
>>> Hello Arnaud,
>>>
>>> Would this be after you compiled ITK with out this flag, and then 
>>> had a project using ITK where this flag was added?
>>>
>>> Brad
>>>
>>>
>>> On May 9, 2012, at 8:00 AM, Arnaud Gelas wrote:
>>>
>>>> Hi all,
>>>>
>>>> When doing cmake -DCMAKE_CXX_FLAGS=-std=gnu++0x /path/to/ITK && make
>>>> -j8, I get compilation errors in vnl_math (see below).
>>>>
>>>> gcc version: 4.6.3
>>>> cmake version: 2.8.7
>>>>
>>>> What would be the best way to fix these errors?
>>>>
>>>> Thanks,
>>>> Arnaud
>>>>
>>>> ---
>>>>
>>>> /home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:87:27:
>>>> error: ‘constexpr’ needed for in-class initialization of static data
>>>> member ‘e’ of non-integral type
>>>> /home/ajg23/DEVEL/src/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:88:31:
>>>> error: ‘constexpr’ needed for in-class initialization of static data

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20120509/4fb72874/attachment.htm>


More information about the Insight-developers mailing list