Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to troubleshoot / debug - beginner's question
QtWS25 Last Chance

How to troubleshoot / debug - beginner's question

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 439 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    OK, I finally cloned the code I wanted from github -using SmartGit.

    It won't "run" with this error

    .Executable /media/z/DOC_COPY_LABEL/Projects /QT_Repository/examples/bluetooth/build-btscanner-Desktop-Debug/btscanner does not exist.

    Nice , but it reports "after the fact" - btscanner DOES NOT EXIST
    AND IT WON'T TELL ME WHY .

    This is the only "error" I get when I run qmake

    /media/z/DOC_COPY_LABEL/Projects /QT_Repository/examples/bluetooth/btscanner/btscanner.pro:4: error: 'qtConfig' is not a recognized test function.

    What is the recommended way (tutorial?) to sort-of "go backwards" to find out the problem if Qt does not tell me and there are NO OBVIOUS errors reported ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What repository is that ?
      Which version of Qt are you using ?
      With which compiler ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        Local repository taken form

        f86f6cfc-818a-4638-aff1-c4c710080475-image.png

        Qt Creator 3.5.1
        Based on Qt 5.5.1 (GCC 5.2.1 20151129, 64 bit)

        Compiler ?
        Is that part of IDE ?
        I do not know what complier is used by QT Creator to "build".

        I can create new project and it runs - so I figure it is NOT related to anything you have asked about.

        I just need some guidance WHERE to find why the file was not build , for what reason.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          No the compiler is not part of the IDE.

          From the looks of if you are on Linux and if so, you are likely using gcc

          Since you are using Qt Creator, there's a build panel at the bottom that shows what is going on. It's the first place to check.

          Before that, your clone of qtconnectivity is likely on the dev branch, you should checkout the branch that matches the Qt version you are using to build the example.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #5

            Here is "compiler output"

            18:58:36: Running steps for project btscanner...
            18:58:36: Configuration unchanged, skipping qmake step.
            18:58:36: Starting: "/usr/bin/make"
            Some of the required modules (qtConfig(listwidget)) are not available.
            Skipped.
            18:58:36: The process "/usr/bin/make" exited normally.
            18:58:36: Elapsed time: 00:00.

            Question
            If required module is missing, what is being "skipped and exited normally"?

            This is "digital" it either works or not .
            I would expect "exit with error ".

            What is with this wishy-washy approach of Qt?
            Not too user friendly for start...

            "start debugging"
            returns SAME - missing file

            Not much debugging help form that.

            So - how and where I ADD qtConfig(listwidget) and WHY it did not come with cloning ?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by Anonymous_Banned275
              #6

              After commenting out
              requires(qtConfig(listwidget))
              in x.pro file

              I get real errors indicating that cloning from github was futile.
              So much for "examples ".
              Time to start over.

              TARGET = btscanner

              QT = core bluetooth widgets

              //requires(qtConfig(listwidget))

              TEMPLATE = app

              SOURCES =
              main.cpp
              device.cpp
              service.cpp

              HEADERS =
              device.h
              service.h

              FORMS =
              device.ui
              service.ui

              target.path = $$[QT_INSTALL_EXAMPLES]/bluetooth/btscanner
              INSTALLS += target

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Anonymous_Banned275
                wrote on last edited by
                #7

                Here is an compiler output after cleaning up the cloned code and setting some options and adding -j to make .

                btscanner in now functional

                20:16:47: Running steps for project btscanner...
                20:16:47: Starting: "/usr/bin/make" clean
                rm -f .moc/moc_device.cpp .moc/moc_service.cpp
                rm -f .uic/ui_device.h .uic/ui_service.h
                rm -f .obj/main.o .obj/device.o .obj/service.o .obj/moc_device.o .obj/moc_service.o
                rm -f *~ core *.core
                20:16:47: The process "/usr/bin/make" exited normally.
                20:16:47: Configuration unchanged, skipping qmake step.
                20:16:47: Starting: "/usr/bin/make" -j
                /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../btscanner/device.ui -o .uic/ui_device.h
                /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../btscanner/service.ui -o .uic/ui_service.h
                g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_TSLIB -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_BLUETOOTH_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../btscanner -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtBluetooth -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I.uic -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o .obj/service.o ../btscanner/service.cpp
                /usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_NO_TSLIB -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_BLUETOOTH_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I'/media/z/DOC_COPY_LABEL/Projects /QT_Repository/examples/bluetooth/btscanner' -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtBluetooth -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../btscanner/service.h -o .moc/moc_service.cpp

                Pl45m4P 1 Reply Last reply
                1
                • A Anonymous_Banned275

                  Here is an compiler output after cleaning up the cloned code and setting some options and adding -j to make .

                  btscanner in now functional

                  20:16:47: Running steps for project btscanner...
                  20:16:47: Starting: "/usr/bin/make" clean
                  rm -f .moc/moc_device.cpp .moc/moc_service.cpp
                  rm -f .uic/ui_device.h .uic/ui_service.h
                  rm -f .obj/main.o .obj/device.o .obj/service.o .obj/moc_device.o .obj/moc_service.o
                  rm -f *~ core *.core
                  20:16:47: The process "/usr/bin/make" exited normally.
                  20:16:47: Configuration unchanged, skipping qmake step.
                  20:16:47: Starting: "/usr/bin/make" -j
                  /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../btscanner/device.ui -o .uic/ui_device.h
                  /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../btscanner/service.ui -o .uic/ui_service.h
                  g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_TSLIB -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_BLUETOOTH_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../btscanner -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtBluetooth -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I.uic -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o .obj/service.o ../btscanner/service.cpp
                  /usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_NO_TSLIB -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_BLUETOOTH_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I'/media/z/DOC_COPY_LABEL/Projects /QT_Repository/examples/bluetooth/btscanner' -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtBluetooth -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../btscanner/service.h -o .moc/moc_service.cpp

                  Pl45m4P Offline
                  Pl45m4P Offline
                  Pl45m4
                  wrote on last edited by Pl45m4
                  #8

                  @AnneRanch

                  Does your Qt installation work at all?
                  How you installed Qt / Qt Creator?

                  The easy way to test whether the example projects run or not would be to go to the welcome screen of Qt Creator and select an example from "Examples" tab.
                  Even if you want to clone your code from git, you could give it a try and see if you can run examples from there.

                  What Linux distribution are you using?
                  Qt Creator 3.5 seems a bit outdated to me

                  @AnneRanch said in How to troubleshoot / debug - beginner's question:

                  WHY it did not come with cloning ?

                  This line is actually included

                  https://code.qt.io/cgit/qt/qtconnectivity.git/tree/examples/bluetooth/btscanner/btscanner.pro?h=5.15#n4

                  Edit:

                  Ah never mind. So it's working now?


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  1 Reply Last reply
                  0

                  • Login

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