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. Runtime error by executable built with Qt5
Forum Updated to NodeBB v4.3 + New Features

Runtime error by executable built with Qt5

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    pietrom
    wrote on last edited by
    #1

    Trying to build an example program from Qt 5.1, I get this runtime error:

    @Starting /Users/pietro/myProgs/ParamGUI/build-6_treeview-Desktop_Qt_5_1_0_clang_64bit-Debug/mv_tree.app/Contents/MacOS/mv_tree...
    dyld: Library not loaded: /Users/bld.qt/bamboo-agent-home/xml-data/build-dir/DQTC-LGPLRELEASEBUILD510-OSX106/PADDING/lib/QtWidgets.framework/Versions/5/QtWidgets
    Referenced from: /Users/pietro/myProgs/ParamGUI/build-6_treeview-Desktop_Qt_5_1_0_clang_64bit-Debug/mv_tree.app/Contents/MacOS/mv_tree
    Reason: image not found
    The program has unexpectedly finished.
    /Users/pietro/myProgs/ParamGUI/build-6_treeview-Desktop_Qt_5_1_0_clang_64bit-Debug/mv_tree.app/Contents/MacOS/mv_tree exited with code 0
    @

    Starting the program with the debugger, with a break point at the first instruction in main(), I get this error message (relative to a binary code location):

    @The inferior stopped because it received a signal from the Operating System.
    Signal name: SIGTRAP
    Signal meaning: Trace/breakpoint trap@

    --- New tests ---
    In the same environment:

      • A "Plain C++ Project (CMake Build)" works correctly.
      • A "Qt Console Application" has the same issues as the application mentioned in this question.

    With Qt 4.8, I never had this issue.

    --- Project source code ---

    Pro file:

    @QT += core
    QT -= gui
    TARGET = Qt5Test
    CONFIG += console
    CONFIG -= app_bundle
    TEMPLATE = app
    SOURCES += main.cpp
    @

    main.cpp file:

    @#include <QCoreApplication>

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);

    return a.exec&#40;&#41;;
    

    }
    @

    Platform: Qt 5.1, Mac OS-X 10.7, QtCreator 2.7.2

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

      Hi,

      From line number 4 of your first snippet, it seems that a library is not found, what does otool -T on your exec return ?

      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
      • P Offline
        P Offline
        pietrom
        wrote on last edited by
        #3

        Hi SGaist,

        here is what I get:

        @> otool -T Qt5Test2

        Qt5Test2:
        Table of contents (0 entries)
        module index symbol index
        @

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

          Sorry, typo, i mean otool -L

          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
          • P Offline
            P Offline
            pietrom
            wrote on last edited by
            #5

            Here it is:

            @> otool -L ./Qt5Test2
            ./Qt5Test2:
            /Users/bld.qt/bamboo-agent-home/xml-data/build-dir/DQTC-LGPLRELEASEBUILD510-OSX106/PADDING/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.1.0, current version 5.1.0)
            /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)@

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

              It seems that your Qt libraries id are "unclean"

              Can you change it and rebuild/return your application ?

              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
              • P Offline
                P Offline
                pietrom
                wrote on last edited by
                #7

                Next week-end I will try to install the new Qt 5.1.1. Maybe it is something they just fixed.

                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