Thanks for the patch Ian. I think I'll stick with the CXX flag solution because I already have it up and running.

But again, thanks for the help!


On Mon, Jan 20, 2014 at 3:54 AM, Ian Scott <> wrote:

I don't kow how much this will help, but this is the patch we applied on a private version of VXL to get C++11 constexpr static initialisation working for vnl_math on gcc and MSVC, whilst maintaining C++98 compatibility.


On 18/01/2014 21:01, Brandon Mayer wrote:
Hello all,

I would like to link a client application build with clang under osx
mavericks to VXL libraries also built with clang and mac osx mavericks.
While there were no problems building VXL using the default settings,
the client application uses c++11 features (std::thread) and needed to
have the -std=c++11 passed to clang which resulted in build errors due
to static const float initialization inside vnl class class definitions
(vnl_numeric_limits.h) which was included in the client application. To
solve the problem, I set VCL_STATIC_CONST_INIT_FLOAT=0 in the
automatically generated ${VXLBIN}/vcl_config_compiler.h file and rebuilt

After that the client application successfully builds because when it
includes relevant vnl headers, there are no static constant float
initializations in the class definitions which clang doesn't seem to
like if the -std=c++11 flag is used but doesn't mind otherwise.

So, Is there a way to specify to specify via CMAKE or an environment
variable that despite the result of the configuration test in
${VXLSRC}/configure, line 3798, I do not want to have static constant
floats initialized inside class definitions?

Thanks for your help and I'm sorry if the answer is something obvious
that I missed.


Brandon Mayer <>


CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.

Vxl-users mailing list

Brandon Mayer