openrave icon indicating copy to clipboard operation
openrave copied to clipboard

make fails with "array must be initialized with a brace-enclosed initializer" (master, Ubuntu 16.04)

Open atenpas opened this issue 3 years ago • 2 comments

Running make for the master branch on Ubuntu 16.04 fails with errors like:

include/openrave/kinbody.h:1143:75:` error: array must be initialized with a brace-enclosed initializer

and

include/openrave/kinbody.h:1143:75: error: too many initializers for ‘boost::array<short int, 3ul>’

I suspect that this has to do with the boost library version? I'm using 1.58.

atenpas avatar Dec 16 '20 17:12 atenpas

I have not taken detailed look,but please try -DCMAKE_CXX_FLAGS=-std=gnu++11 or gnu++14 in cmake. (note: g++-6 defaults to gnu++14)

cielavenir avatar Dec 16 '20 22:12 cielavenir

Hi @atenpas , I fixed this by initializing all boost::array object with command boost:array<T, size> object = {{ }}, i.e. using double brace.

huiwenzhang avatar Jan 09 '21 01:01 huiwenzhang