4lex4 / scantailor-advanced

ScanTailor Advanced is the version that merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and fixes.
GNU General Public License v3.0
1.15k stars 128 forks source link

Error compilaton #189

Open pit65 opened 2 years ago

pit65 commented 2 years ago

Slackware 15

error compilation scantailor 1.0.16.

[ 41%] Building CXX object foundation/CMakeFiles/foundation.dir/PropertyFactory.cpp.o
[ 42%] Building CXX object foundation/CMakeFiles/foundation.dir/PropertySet.cpp.o
[ 42%] Building CXX object foundation/CMakeFiles/foundation.dir/PerformanceTimer.cpp.o
[ 42%] Building CXX object foundation/CMakeFiles/foundation.dir/QtSignalForwarder.cpp.o
[ 42%] Building CXX object foundation/CMakeFiles/foundation.dir/GridLineTraverser.cpp.o
[ 42%] Linking CXX static library libfoundation.a
[ 42%] Built target foundation
[ 42%] Building CXX object math/CMakeFiles/math.dir/LinearSolver.cpp.o
[ 42%] Building CXX object math/CMakeFiles/math.dir/SidesOfLine.cpp.o
[ 42%] Building CXX object math/CMakeFiles/math.dir/ToLineProjector.cpp.o
/tmp/SBo/scantailor-advanced-1.0.16/math/ToLineProjector.cpp: In constructor ‘ToLineProjector::ToLineProjector(const QLineF&)’:
/tmp/SBo/scantailor-advanced-1.0.16/math/ToLineProjector.cpp:27:23: error: ‘numeric_limits’ was not declared in this scope
   27 |   if (std::abs(AtA) > numeric_limits<double>::epsilon()) {
      |                       ^~~~~~~~~~~~~~
/tmp/SBo/scantailor-advanced-1.0.16/math/ToLineProjector.cpp:27:38: error: expected primary-expression before ‘double’
   27 |   if (std::abs(AtA) > numeric_limits<double>::epsilon()) {
      |                                      ^~~~~~
/tmp/SBo/scantailor-advanced-1.0.16/math/ToLineProjector.cpp:27:38: error: expected ‘)’ before ‘double’
   27 |   if (std::abs(AtA) > numeric_limits<double>::epsilon()) {
      |      ~                               ^~~~~~
      |                                      )
make[2]: *** [math/CMakeFiles/math.dir/build.make:104: math/CMakeFiles/math.dir/ToLineProjector.cpp.o] Błąd 1
make[1]: *** [CMakeFiles/Makefile2:715: math/CMakeFiles/math.dir/all] Błąd 2
make: *** [Makefile:166: all] Błąd 2
mara004 commented 2 years ago

Which compiler are you using, and at which version?

trufanov-nok commented 2 years ago

try to add #include <limits> in this file.