janba / GEL

A library of geometry processing tools for computer graphics
95 stars 23 forks source link

Missing include when building on Linux #29

Closed CptDerpy closed 4 years ago

CptDerpy commented 4 years ago

Running make -j8 results in the following error when building on Linux:

Building CXX object CMakeFiles/GEL.dir/src/GEL/GLGraphics/Console.cpp.o
/home/Documents/GEL/src/GEL/GLGraphics/Console.cpp: In member function 'void GLGraphics::Console::open_socket()':
/home/Documents/GEL/src/GEL/GLGraphics/Console.cpp:614:12 error: 'SIGPIPE' was not declared in this scope
  614 |     signal(SIGPIPE, SIG_IGN);
      |            ^~~~~~~
/home/Documents/GEL/src/GEL/GLGraphics/Console.cpp:614:21 error: 'SIG_IGN' was not declared in this scope
  614 |    signal(SIGPIPE, SIG_IGN);
      |                    ^~~~~~~
/home/Documents/GEL/src/GEL/GLGraphics/Console.cpp:614:5 error: 'signal' was not declared in this scope; did you mean 'signed'?
  614 |    signal(SIGPIPE, SIG_IGN);
      |    ^~~~~~
      |    signed
make[2]: *** [CMakeFiles/GEL.dir/build.make:947: CMakeFiles/GEL.dir/src/GEL/GLGraphics/Console.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/GEL.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Adding #include <csignal> to the header file Console.h appears to fix the problem.

janba commented 4 years ago

Should work courtesy of leomariga's patch