Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't build on i386 #2

Closed
trebmuh opened this issue Jul 9, 2022 · 4 comments
Closed

Doesn't build on i386 #2

trebmuh opened this issue Jul 9, 2022 · 4 comments

Comments

@trebmuh
Copy link

trebmuh commented Jul 9, 2022

Build BLow.lv2 GUI...../../src/BLow_GUI.cpp: In static member function 'static void BLow_GUI::valueChangedCallback(BEvents::Event*)':
../../src/BLow_GUI.cpp:192:53: error: no matching function for call to 'min(unsigned int, long unsigned int)'
  192 |      float value = std::min (vt->getValue() - 1, 9ul);
      |                                                     ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/string:40,
                 from ../../src/../BWidgets/BUtilities/to_string.hpp:21,
                 from ../../src/BLow_GUI.cpp:6:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)'
  230 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note:   template argument deduction/substitution failed:
../../src/BLow_GUI.cpp:192:53: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'long unsigned int')
  192 |      float value = std::min (vt->getValue() - 1, 9ul);
      |                                                     ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
                 from /usr/include/c++/10/string:40,
                 from ../../src/../BWidgets/BUtilities/to_string.hpp:21,
                 from ../../src/BLow_GUI.cpp:6:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  278 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note:   template argument deduction/substitution failed:
../../src/BLow_GUI.cpp:192:53: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'long unsigned int')
  192 |      float value = std::min (vt->getValue() - 1, 9ul);
      |                                                     ^
In file included from /usr/include/c++/10/algorithm:62,
                 from ../../src/../BWidgets/BWidgets/Supports/Linkable.hpp:21,
                 from ../../src/../BWidgets/BWidgets/Widget.hpp:25,
                 from ../../src/../BWidgets/BWidgets/Window.hpp:25,
                 from ../../src/BLow_GUI.cpp:7:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)'
 3468 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
../../src/BLow_GUI.cpp:192:53: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned int'
  192 |      float value = std::min (vt->getValue() - 1, 9ul);
      |                                                     ^
In file included from /usr/include/c++/10/algorithm:62,
                 from ../../src/../BWidgets/BWidgets/Supports/Linkable.hpp:21,
                 from ../../src/../BWidgets/BWidgets/Widget.hpp:25,
                 from ../../src/../BWidgets/BWidgets/Window.hpp:25,
                 from ../../src/BLow_GUI.cpp:7:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)'
 3474 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note:   template argument deduction/substitution failed:
../../src/BLow_GUI.cpp:192:53: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned int'
  192 |      float value = std::min (vt->getValue() - 1, 9ul);
      |                                                     ^
make[1]: *** [makefile:97: BLow_GUI.so] Error 1
make[1]: Leaving directory '/build/blow-1.2.0+20220709'
@trebmuh
Copy link
Author

trebmuh commented Jan 17, 2023

Hi @sjaehn : just bumping you here to be sure that you've read it.
Is there something I'm doing wrongly while building maybe ?

@sjaehn
Copy link
Owner

sjaehn commented Jan 17, 2023

Salute Olivier, I've to admit that I made B.Low not with much seriousness. See the release date in the README.md just below the screenshot.

But nevertheless, I'll try to fix it. Does the just committed typecasting to float (and thus omitting the ambiguous unsigned longs) help?

192  float value = std::min (static_cast<float>(vt->getValue() - 1), 9.0f);

@trebmuh
Copy link
Author

trebmuh commented Jan 19, 2023

Hi @sjaehn
It does, thank you very much!

@trebmuh trebmuh closed this as completed Jan 19, 2023
@trebmuh
Copy link
Author

trebmuh commented Jan 19, 2023

I've to admit that I made B.Low not with much seriousness. See the release date in the README.md just below the screenshot.

oh shit! (that's the way to put it) 😄
I didn't noticed the release date, neither I tried it yet.
Now I did try it.
OK, good game @sjaehn , you got one more person with your April fool's day several months after the fateful date!

... now I'm going to wash my underwear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants