Closed thepure12 closed 7 months ago
This would suggest your compiler isn't using C++20 or doesn't support it, even though my cmake setup explicitly requires CXX_STANDARD 20
.
https://en.cppreference.com/w/cpp/string/basic_string_view/basic_string_view
It's claiming that number 5 on this list doesn't exist.
What compiler are you using?
Also FYI I have never known CMAKE_BUILD_TYPE=Debug to work correctly because it causes CEF to crash on launch, even with the latest official version. Let me know if you get it working though.
This is my CMakeCXXCompiler.cmake file.
set(CMAKE_CXX_COMPILER "/usr/bin/c++")
set(CMAKE_CXX_COMPILER_ARG1 "")
set(CMAKE_CXX_COMPILER_ID "GNU")
set(CMAKE_CXX_COMPILER_VERSION "9.4.0")
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
set(CMAKE_CXX_COMPILER_WRAPPER "")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
Can you post the contents of /home/user/workspace/Bolt/build/CMakeFiles/bolt.dir/flags.make
?
flags.make
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.21
# compile CXX with /usr/bin/c++
CXX_DEFINES = -DBOLT_FLATHUB_BUILD=0 -DBOLT_LIB_NAME=\"bolt-plugin\"
CXX_INCLUDES = -I/home/user/workspace/Bolt/cef/dist -I/home/user/workspace/Bolt/modules/fmt/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
CXX_FLAGS = -g -std=c++2a
Ahh okay. Your compiler is very old (probably GCC 9?) and has only partial c++20 support. You need to install a more recent compiler like GCC 13 by updating your package manager.
Running the command c++ version
will tell you your compiler and version, so that you can check you've upgraded correctly.
After updating, you'll need to delete the build directory and run the first command again.
Closing as old, let me know if you need anything else
Here is what I am running, and here is the error I get.