Closed webspacecreations closed 3 years ago
Solution is the following: Open machines/machineproperties.h
Add the following two include statements to the include block at the top ~line 10:
#include <limits>
#include <algorithm>
Compilation now completes
Merged the fix in with e7e28b4.
Compile fails on Pi4 Testing on Pi4, but this appears to be general enough to apply to other platforms. Followed compile instructions and get failure: [ 89%] Building CXX object machines/CMakeFiles/machines.dir/machinefactory.cpp.o
To Reproduce cmake -DCMAKE_BUILD_TYPE=Release .. make dingusppc
I repeated the entire process with a fresh recursive git clone to be sure. The following are the negative cmake results (nothing fatal, but providing in case it helps identify the make error): -- Looking for include file AudioUnit/AudioUnit.h -- Looking for include file AudioUnit/AudioUnit.h - not found -- Looking for include file audioclient.h -- Looking for include file audioclient.h - not found -- Looking for include files windows.h, mmsystem.h -- Looking for include files windows.h, mmsystem.h - not found -- Looking for include file SLES/OpenSLES.h -- Looking for include file SLES/OpenSLES.h - not found -- Looking for include file android/log.h -- Looking for include file android/log.h - not found -- Looking for include file sys/audioio.h -- Looking for include file sys/audioio.h - not found -- Looking for include file kai.h -- Looking for include file kai.h - not found
Error output In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30: /home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h: In constructor ‘IntProperty::IntProperty(uint32_t)’: /home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:80:33: error: ‘numeric_limits’ is not a member of ‘std’ this->min = std::numeric_limits::min();
^::min();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:80:63: error: no matching function for call to ‘min()’
this->min = std::numeric_limits::min();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:195:5: note: candidate: ‘template const _Tp& std::min(const _Tp&, const _Tp&)’
min(const _Tp& a, const _Tp& b)
^~~
/usr/include/c++/8/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:80:63: note: candidate expects 2 arguments, 0 provided
this->min = std::numeric_limits::min();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:243:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
min(const _Tp& a, const _Tp& b, _Compare comp)
^~~
/usr/include/c++/8/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:80:63: note: candidate expects 3 arguments, 0 provided
this->min = std::numeric_limits::min();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:81:33: error: ‘numeric_limits’ is not a member of ‘std’
this->max = std::numeric_limits::max();
^::max();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:81:63: error: no matching function for call to ‘max()’
this->max = std::numeric_limits::max();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘template const _Tp& std::max(const _Tp&, const _Tp&)’
max(const _Tp& __a, const _Tp& b)
^~~
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:81:63: note: candidate expects 2 arguments, 0 provided
this->max = std::numeric_limits::max();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
max(const _Tp& a, const _Tp& __b, _Compare comp)
^~~
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:81:63: note: candidate expects 3 arguments, 0 provided
this->max = std::numeric_limits::max();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h: In constructor ‘IntProperty::IntProperty(uint32_t, std::vector)’:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:102:33: error: ‘numeric_limits’ is not a member of ‘std’
this->min = std::numeric_limits::min();
^::min();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:102:63: error: no matching function for call to ‘min()’
this->min = std::numeric_limits::min();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:195:5: note: candidate: ‘template const _Tp& std::min(const _Tp&, const _Tp&)’
min(const _Tp& a, const _Tp& b)
^~~
/usr/include/c++/8/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:102:63: note: candidate expects 2 arguments, 0 provided
this->min = std::numeric_limits::min();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:243:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
min(const _Tp& a, const _Tp& b, _Compare comp)
^~~
/usr/include/c++/8/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:102:63: note: candidate expects 3 arguments, 0 provided
this->min = std::numeric_limits::min();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:103:33: error: ‘numeric_limits’ is not a member of ‘std’
this->max = std::numeric_limits::max();
^::max();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:103:63: error: no matching function for call to ‘max()’
this->max = std::numeric_limits::max();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘template const _Tp& std::max(const _Tp&, const _Tp&)’
max(const _Tp& __a, const _Tp& b)
^~~
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:103:63: note: candidate expects 2 arguments, 0 provided
this->max = std::numeric_limits::max();
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from /home/pi/Projects/dingusppc-feb2021/devices/hwcomponent.h:25,
from /home/pi/Projects/dingusppc-feb2021/machines/machinebase.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:30,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
max(const _Tp& a, const _Tp& __b, _Compare comp)
^~~
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:103:63: note: candidate expects 3 arguments, 0 provided
this->max = std::numeric_limits::max();
^
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h: In member function ‘bool IntProperty::check_val(uint32_t)’:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:161:61: error: no matching function for call to ‘find(std::vector::iterator, std::vector::iterator, uint32_t&)’
if (find(this->vec.begin(), this->vec.end(), val) != this->vec.end())
^
In file included from /usr/include/c++/8/bits/locale_facets.h:48,
from /usr/include/c++/8/bits/basic_ios.h:37,
from /usr/include/c++/8/ios:44,
from /usr/include/c++/8/istream:38,
from /usr/include/c++/8/fstream:38,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.h:31,
from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:27:
/usr/include/c++/8/bits/streambuf_iterator.h:368:5: note: candidate: ‘template typename gnu_cxx::__enable_if<std::is_char<_CharT2>::value, std::istreambuf_iterator<_CharT> >::type std::find(std::istreambuf_iterator<_CharT>, std::istreambuf_iterator<_CharT>, const _CharT2&)’
find(istreambuf_iterator<_CharT> first,
^~~~
/usr/include/c++/8/bits/streambuf_iterator.h:368:5: note: template argument deduction/substitution failed:
In file included from /home/pi/Projects/dingusppc-feb2021/machines/machinefactory.cpp:30:
/home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:161:61: note: ‘__gnu_cxx::normal_iterator<unsigned int*, std::vector >’ is not derived from ‘std::istreambuf_iterator<_CharT>’
if (find(this->vec.begin(), this->vec.end(), val) != this->vec.end())
^
make[3]: [machines/CMakeFiles/machines.dir/build.make:76: machines/CMakeFiles/machines.dir/machinefactory.cpp.o] Error 1
make[2]: [CMakeFiles/Makefile2:354: machines/CMakeFiles/machines.dir/all] Error 2
make[1]: [CMakeFiles/Makefile2:91: CMakeFiles/dingusppc.dir/rule] Error 2
make: [Makefile:164: dingusppc] Error 2
~~~~~ /home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:80:56: error: expected primary-expression before ‘>’ token this->min = std::numeric_limits~~~~~ /home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:81:56: error: expected primary-expression before ‘>’ token this->max = std::numeric_limits~~~~~ /home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:102:56: error: expected primary-expression before ‘>’ token this->min = std::numeric_limits~~~~~ /home/pi/Projects/dingusppc-feb2021/machines/machineproperties.h:103:56: error: expected primary-expression before ‘>’ token this->max = std::numeric_limits