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

Compilation errors with GCC 14.1 #700

Closed
oltolm opened this issue May 10, 2024 · 6 comments
Closed

Compilation errors with GCC 14.1 #700

oltolm opened this issue May 10, 2024 · 6 comments
Assignees
Labels

Comments

@oltolm
Copy link

oltolm commented May 10, 2024

Hello I get these errors with GCC 14.1

[33/86] Building CXX object _deps/nana-build/CMak...na.dir/source/gui/detail/virtual_keyboard.cpp.obj
FAILED: _deps/nana-build/CMakeFiles/nana.dir/source/gui/detail/virtual_keyboard.cpp.obj
ccache C:\msys64\mingw64\bin\c++.exe -DNANA_ENABLE_VIRTUAL_KEYBOARD -DWIN32 -IC:/src/CPM/nana/4b39f7d62017a007b43e6a296b10b91fafcb2131/include -g -Wall -fmax-errors=3 -MD -MT _deps/nana-build/CMakeFiles/nana.dir/source/gui/detail/virtual_keyboard.cpp.obj -MF _deps\nana-build\CMakeFiles\nana.dir\source\gui\detail\virtual_keyboard.cpp.obj.d -o _deps/nana-build/CMakeFiles/nana.dir/source/gui/detail/virtual_keyboard.cpp.obj -c C:/src/CPM/nana/4b39f7d62017a007b43e6a296b10b91fafcb2131/source/gui/detail/virtual_keyboard.cpp
C:/src/CPM/nana/4b39f7d62017a007b43e6a296b10b91fafcb2131/source/gui/detail/virtual_keyboard.cpp: In lambda function:
C:/src/CPM/nana/4b39f7d62017a007b43e6a296b10b91fafcb2131/source/gui/detail/virtual_keyboard.cpp:331:69: error: 'clamp' is not a member of 'std'
  331 |                                                         left = std::clamp(left, key_candidate_switch_.x - static_cast<int>(candidate_.content_px), 0);
      |                                                                     ^~~~~
C:/src/CPM/nana/4b39f7d62017a007b43e6a296b10b91fafcb2131/source/gui/detail/virtual_keyboard.cpp:344:68: error: 'clamp' is not a member of 'std'
  344 |                                                         top = std::clamp(top, static_cast<int>(this->size().height) - static_cast<int>(candidate_.content_px), 0);
      |                                                                    ^~~~~

I also get the same error when compiling pixel_buffer.cpp.

@qPCR4vir
Copy link
Collaborator

qPCR4vir commented May 13, 2024

Is this fixed by
#include <algorithm>
at the top of virtual_keyboard.cpp ?

@oltolm
Copy link
Author

oltolm commented May 13, 2024

Yes. You also need it in pixel_buffer.cpp.

@qPCR4vir
Copy link
Collaborator

Thanks!
I could not see what that 4b39f7d6... is.
So, what branch/version/commit are you using?

@oltolm
Copy link
Author

oltolm commented May 13, 2024

I use develop-1.8.

qPCR4vir added a commit to qPCR4vir/nana that referenced this issue May 13, 2024
@qPCR4vir
Copy link
Collaborator

Thank!
You can reload now.

@qPCR4vir qPCR4vir self-assigned this May 13, 2024
@qPCR4vir qPCR4vir added the bug label May 13, 2024
@oltolm
Copy link
Author

oltolm commented May 13, 2024

It builds now. Thanks.

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

No branches or pull requests

2 participants