alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 166 forks source link

error when building CXX object CMakeFiles/upper_envelope.dir/upper_envelope.cpp.o #147

Closed HusBunia closed 1 year ago

HusBunia commented 1 year ago

Hi:
I use cmake3 to build my mex file, but the error occurred when I make the files:

cmake3 .. make

from /home/opt/gptb/gptoolbox-master/mex/upper_envelope.cpp:14: /home/opt/gptb/gptoolbox-master/mex/build/_deps/libigl-src/include/igl/copyleft/cgal/assign_scalar.cpp:45:14: error: specialization of ‘template<class RHS, class LHS> void igl::copyleft::cgal::assign_scalar(const RHS&, const bool&, LHS&)’ in different namespace [-fpermissive] float & lhs)

my system is centos7 and the cmake3 version is 3.17.5

can anyone help me about this ? Thanks !

HusBunia commented 1 year ago

I think I have solved the problem by add -permisive for CMAKE_CXX_FLAGS in CMakelist.txt.