f35 kdevelop 5.6.2 :: within project sting_view not found in std?
Adrian Sevcenco
adrian.sev at gmail.com
Fri Feb 11 12:09:00 GMT 2022
On 11.02.2022 12:33, Milian Wolff wrote:
> On Freitag, 11. Februar 2022 10:26:37 CET Adrian Sevcenco wrote:
>> Hi! I have a really weird problem with kdevelop:
>> in the problems tab i get:
>> No type named 'string_view' in namespace 'std'
>>
>> i made sure that in the project configuration -> Laguage support -> C/C++
>> parser i have c++ profile to c++17 and Compiler for path = GCC
>>
>> Any idea why string_view could not be found in std?
>
> I don't know, but can you verify with `KDEV_CLANG_DISPLAY_ARGS=1 kdevelop`
> that it really passes the correct c++ profile to clang?
so, the project have many components and with many standards, and i see lines like this:
Invocation: clang -ferror-limit=100 -fspell-checking -Wunused-parameter -Wunreachable-code -Wall -std=c11 -march=native
-mavx2 -fdiagnostics-color=always -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W
-Woverloaded-virtual -fsigned-char -pthread -O2 -g -DNDEBUG -fPIC -std=c++17 -nostdinc -nostdinc++ -xc++
-isystem/home/physics-tools/ROOT/BUILD/ginclude
-isystem/home/physics-tools/ROOT/BUILD/externals/home/physics-tools/ROOT/master/include -isystem/usr/include/freetype2
-isystem/usr/include/libAfterImage -isystem/home/physics-tools/ROOT/v6-26-00-patches/include -isystem/usr/local/include
-isystem/usr/include -I/home/adrian/GIT-REPOS/ALICE/root/graf2d/asimage/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/unix/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/foundation/v7/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/base/v7/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/clingutils/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/textinput/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/thread/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/zip/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/rint/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/clib/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/meta/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/gui/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/cont/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/foundation/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/base/inc
-I/home/adrian/GIT-REPOS/ALICE/root/graf2d/graf/inc -I/home/adrian/GIT-REPOS/ALICE/root/hist/hist/inc
-I/home/adrian/GIT-REPOS/ALICE/root/math/mathcore/v7/inc -I/home/adrian/GIT-REPOS/ALICE/root/math/mathcore/inc
-I/home/adrian/GIT-REPOS/ALICE/root/core/imt/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/multiproc/inc
-I/home/adrian/GIT-REPOS/ALICE/root/math/matrix/inc -I/home/adrian/GIT-REPOS/ALICE/root/io/io/v7/inc
-I/home/adrian/GIT-REPOS/ALICE/root/io/io/inc -I/home/adrian/GIT-REPOS/ALICE/root/core/clib/res
-I/home/adrian/GIT-REPOS/ALICE/root/builtins -I/home/adrian/GIT-REPOS/ALICE/root/net/net/inc -isystem
/usr/lib64/llvm12/lib/clang/12.0.1/include -imacros /home/adrian/tmp/kdevelop.OKpTZl
/home/adrian/GIT-REPOS/ALICE/root/graf2d/asimage/src/libAfterImage/libjpeg/jccoefct.c
i noticed that there are multiple -std parameters
> Generally that should be taken from cmake, are you ensuring that it uses C++17
> there? Or do you happen to rely on the default c++ standard which may be
> different from GCC (used by cmake by default when compiling) and Clang (as
> used by kdevelop).
in the project configuration i have an explicit -DCMAKE_CXX_STANDARD=17 to Extra arguments of cmake
moreover in Language Support/C/C++ parser the C++ profile is set to c++17
moreover i see a lot of :
kdevelop.plugins.definesandincludes: error while fetching includes for the compiler: "gcc" "Using built-in
specs.\nCOLLECT_GCC=/usr/bin/gcc\nOFFLOAD_TARGET_NAMES=nvptx-none\nOFFLOAD_TARGET_DEFAULT=1\nTarget:
x86_64-redhat-linux\nConfigured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix
--enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-11.2.1-20211203/obj-x86_64-redhat-linux/isl-install
--enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto
--enable-link-serialization=1\nThread model: posix\nSupported LTO compression algorithms: zlib zstd\ngcc version 11.2.1
20211203 (Red Hat 11.2.1-7) (GCC) \nCOLLECT_GCC_OPTIONS='-std=c99' '-E' '-v' '-mtune=generic' '-march=x86-64'\n cc1obj
-E -quiet -v - -mtune=generic -march=x86-64 -std=c99 -dumpbase -\ngcc: fatal error: cannot execute
\xE2\x80\x98""cc1obj\xE2\x80\x99: execvp: No such file or directory\ncompilation terminated.\n"
kdevelop.plugins.definesandincludes: error while fetching defines for the compiler: "gcc" ("-xobjective-c", "-std=c99",
"-dM", "-E", "-") "gcc: fatal error: cannot execute \xE2\x80\x98""cc1obj\xE2\x80\x99: execvp: No such file or
directory\ncompilation terminated.\n"
actually this "project" is something that i make use of (my application make use of this framework) so
i just need parsing of the includes ..
Thanks for the tip!
Adrian
More information about the KDevelop
mailing list