[GRASS-dev] compilation error - macro _n()

Martin Landa landa.martin at gmail.com
Sat May 16 05:57:05 PDT 2015


Hi all,

recently I got problem compiling GRASS module against CGAL library.
The source of problem is duplicated definition of _n() macro.

In file included from /usr/include/boost/random.hpp:37:0,
                 from /usr/local/include/CGAL/spatial_sort.h:31,
                 from /usr/local/include/CGAL/Triangulation_3.h:47,
                 from local_proto.h:4,
                 from main.cpp:25:
/usr/include/boost/random/discard_block.hpp:60:42: error: macro "_n"
requires 3 arguments, but only 1 given
     discard_block_engine() : _rng(), _n(0) { }

GRASS defines _n() macro as [1], Boost is using _n() macro in different meaning.
Any idea who to fix this problem correctly?

Martin

[1] http://trac.osgeo.org/grass/browser/grass/trunk/include/glocale.h#L11

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa


More information about the grass-dev mailing list