Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. GoogleTest compatibility ?
QtWS25 Last Chance

GoogleTest compatibility ?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 373 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jiapei1000
    wrote on 23 Oct 2022, 21:00 last edited by
    #1

    I failed to build qtcreator-4.14.2, with the following ERROR messages:

    [  2%] Building CXX object src/shared/qtlockedfile/CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o
    cd ......-creator/qt-creator/build_22.04/src/shared/qtlockedfile && /usr/bin/c++ -DQT_CORE_LIB -DQT_NO_DEBUG -I......-creator/qt-creator/build_22.04/src/shared/qtlockedfile -I......-creator/qt-creator/src/shared/qtlockedfile -I......-creator/qt-creator/build_22.04/src/shared/qtlockedfile/shared_qtlockedfile_autogen/include -isystem /opt/qt/5/include -isystem /opt/qt/5/include/QtCore -isystem /opt/qt/5/./mkspecs/linux-g++ -O3 -DNDEBUG -Wno-missing-field-initializers -fPIC -std=c++17 -MD -MT src/shared/qtlockedfile/CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o -MF CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o.d -o CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o -c ......-creator/qt-creator/src/shared/qtlockedfile/qtlockedfile.cpp
    In file included from /opt/google/googletest/googletest/src/gtest-all.cc:43:
    /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:148:8: error: no declaration matches ‘size_t testing::internal::FilePath::CalculateRootLength() const’
      148 | size_t FilePath::CalculateRootLength() const {
          |        ^~~~~~~~
    /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:148:8: note: no functions named ‘size_t testing::internal::FilePath::CalculateRootLength() const’
    In file included from /usr/local/include/gtest/internal/gtest-internal.h:70,
                     from /usr/local/include/gtest/gtest-printers.h:114,
                     from /usr/local/include/gtest/gtest-matchers.h:48,
                     from /usr/local/include/gtest/internal/gtest-death-test-internal.h:46,
                     from /usr/local/include/gtest/gtest-death-test.h:43,
                     from /usr/local/include/gtest/gtest.h:60,
                     from /opt/google/googletest/googletest/src/gtest-all.cc:38:
    /usr/local/include/gtest/internal/gtest-filepath.h:64:18: note: ‘class testing::internal::FilePath’ defined here
       64 | class GTEST_API_ FilePath {
          |                  ^~~~~~~~
    In file included from /opt/google/googletest/googletest/src/gtest-all.cc:43:
    /opt/google/googletest/googletest/src/../src/gtest-filepath.cc: In member function ‘bool testing::internal::FilePath::IsRootDirectory() const’:
    /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:290:24: error: ‘CalculateRootLength’ was not declared in this scope
      290 |   size_t root_length = CalculateRootLength();
          |                        ^~~~~~~~~~~~~~~~~~~
    /opt/google/googletest/googletest/src/../src/gtest-filepath.cc: In member function ‘bool testing::internal::FilePath::IsAbsolutePath() const’:
    /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:297:10: error: ‘CalculateRootLength’ was not declared in this scope
      297 |   return CalculateRootLength() > 0;
          |          ^~~~~~~~~~~~~~~~~~~
    [  2%] Building C object src/libs/3rdparty/syntax-highlighting/CMakeFiles/QtCreatorPchGui.dir/cmake_pch.h.gch
    

    I'm using gcc 11.2.0 under Ubuntu 22.04.1

    ➜  ~ gcc --version
    gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    Did anybody meet the same issue???

    A nobody in computer vision & AI

    J 1 Reply Last reply 24 Oct 2022, 01:21
    0
    • J jiapei1000
      23 Oct 2022, 21:00

      I failed to build qtcreator-4.14.2, with the following ERROR messages:

      [  2%] Building CXX object src/shared/qtlockedfile/CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o
      cd ......-creator/qt-creator/build_22.04/src/shared/qtlockedfile && /usr/bin/c++ -DQT_CORE_LIB -DQT_NO_DEBUG -I......-creator/qt-creator/build_22.04/src/shared/qtlockedfile -I......-creator/qt-creator/src/shared/qtlockedfile -I......-creator/qt-creator/build_22.04/src/shared/qtlockedfile/shared_qtlockedfile_autogen/include -isystem /opt/qt/5/include -isystem /opt/qt/5/include/QtCore -isystem /opt/qt/5/./mkspecs/linux-g++ -O3 -DNDEBUG -Wno-missing-field-initializers -fPIC -std=c++17 -MD -MT src/shared/qtlockedfile/CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o -MF CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o.d -o CMakeFiles/shared_qtlockedfile.dir/qtlockedfile.cpp.o -c ......-creator/qt-creator/src/shared/qtlockedfile/qtlockedfile.cpp
      In file included from /opt/google/googletest/googletest/src/gtest-all.cc:43:
      /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:148:8: error: no declaration matches ‘size_t testing::internal::FilePath::CalculateRootLength() const’
        148 | size_t FilePath::CalculateRootLength() const {
            |        ^~~~~~~~
      /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:148:8: note: no functions named ‘size_t testing::internal::FilePath::CalculateRootLength() const’
      In file included from /usr/local/include/gtest/internal/gtest-internal.h:70,
                       from /usr/local/include/gtest/gtest-printers.h:114,
                       from /usr/local/include/gtest/gtest-matchers.h:48,
                       from /usr/local/include/gtest/internal/gtest-death-test-internal.h:46,
                       from /usr/local/include/gtest/gtest-death-test.h:43,
                       from /usr/local/include/gtest/gtest.h:60,
                       from /opt/google/googletest/googletest/src/gtest-all.cc:38:
      /usr/local/include/gtest/internal/gtest-filepath.h:64:18: note: ‘class testing::internal::FilePath’ defined here
         64 | class GTEST_API_ FilePath {
            |                  ^~~~~~~~
      In file included from /opt/google/googletest/googletest/src/gtest-all.cc:43:
      /opt/google/googletest/googletest/src/../src/gtest-filepath.cc: In member function ‘bool testing::internal::FilePath::IsRootDirectory() const’:
      /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:290:24: error: ‘CalculateRootLength’ was not declared in this scope
        290 |   size_t root_length = CalculateRootLength();
            |                        ^~~~~~~~~~~~~~~~~~~
      /opt/google/googletest/googletest/src/../src/gtest-filepath.cc: In member function ‘bool testing::internal::FilePath::IsAbsolutePath() const’:
      /opt/google/googletest/googletest/src/../src/gtest-filepath.cc:297:10: error: ‘CalculateRootLength’ was not declared in this scope
        297 |   return CalculateRootLength() > 0;
            |          ^~~~~~~~~~~~~~~~~~~
      [  2%] Building C object src/libs/3rdparty/syntax-highlighting/CMakeFiles/QtCreatorPchGui.dir/cmake_pch.h.gch
      

      I'm using gcc 11.2.0 under Ubuntu 22.04.1

      ➜  ~ gcc --version
      gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
      Copyright (C) 2021 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      

      Did anybody meet the same issue???

      J Offline
      J Offline
      JKSH
      Moderators
      wrote on 24 Oct 2022, 01:21 last edited by
      #2

      @jiapei1000 said in GoogleTest compatibility ?:

      I failed to build qtcreator-4.14.2....

      I'm using gcc 11.2.0 under Ubuntu 22.04.1

      Qt Creator 4.14 is quite old, but Ubuntu 22.04 is quite new. Most likely you have a newer version of GoogleTest that is backward-incompatible with the version used by Qt Creator 4.14.

      May I ask why you want to build Qt Creator 4.14? Your have other options:

      • Build a newer version: https://download.qt.io/official_releases/qtcreator/ OR
      • Download and run the installer for Qt Creator 4.14: https://download.qt.io/archive/qtcreator/4.14/4.14.2/qt-creator-opensource-linux-x86_64-4.14.2.run

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      J 1 Reply Last reply 25 Oct 2022, 07:44
      1
      • J JKSH
        24 Oct 2022, 01:21

        @jiapei1000 said in GoogleTest compatibility ?:

        I failed to build qtcreator-4.14.2....

        I'm using gcc 11.2.0 under Ubuntu 22.04.1

        Qt Creator 4.14 is quite old, but Ubuntu 22.04 is quite new. Most likely you have a newer version of GoogleTest that is backward-incompatible with the version used by Qt Creator 4.14.

        May I ask why you want to build Qt Creator 4.14? Your have other options:

        • Build a newer version: https://download.qt.io/official_releases/qtcreator/ OR
        • Download and run the installer for Qt Creator 4.14: https://download.qt.io/archive/qtcreator/4.14/4.14.2/qt-creator-opensource-linux-x86_64-4.14.2.run
        J Offline
        J Offline
        jiapei1000
        wrote on 25 Oct 2022, 07:44 last edited by jiapei1000
        #3

        @JKSH My bad... I found qt-creator probably from archive, rather than official_releases...

        Problem solved....

        But, one thing: I need to comment out line 121 // style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; of file ....../qt-creator-opensource-src-8.0.2/src/plugins/clangformat/clangformatutils.cpp .

        A nobody in computer vision & AI

        1 Reply Last reply
        0

        1/3

        23 Oct 2022, 21:00

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved