Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21336

HelpManager link undefinded reference

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 4.8.0-beta1
    • Building Qt Creator
    • None
    • Linux/X11

    Description

      In my .pro file I have lines:

      QTC_PLUGIN_DEPENDS += \
        coreplugin \
        debugger \
        help \
        projectexplorer \
        qtsupport

      in source code I'm trying to use Help plugin API for telemetry purposes:

      #include <coreplugin/helpmanager.h>
      #include <plugins/help/helpmanager.h>
      ...
      connect(Help::Internal::HelpManager::instance(), 
              &Help::Internal::HelpManager::helpRequested,
              this, 
              &HelpPagesDataSource::onPageOpenned);

      However get link errors which is strange as other classes in Help plugin uses Help::Internal::HelpManager::instance() without a problem:

       g++ .../qt-creator-debug/lib/qtcreator/plugins -lCore -lDebugger -lHelp -lProjectExplorer -lQtSupport -lCppTools -lTextEditor -lResourceEditor -lQTelemetry -lLanguageUtils -lQmlDebug -lQmlJS -lQtcSsh -lCPlusPlus -lAggregation -lExtensionSystem -lUtils -L/home/aleksey/Qt/5.11.2/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Test -lQt5Concurrent -lQt5Network -lQt5Core -lGL -lpthread 
      /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: .obj/debug-shared/helppagesdatasource.o: in function `HelpPagesDataSource::HelpPagesDataSource()':
      make[1]: datasources/helppagesdatasource.cpp:42: undefined reference to `Help::Internal::HelpManager::helpRequested(QUrl const&, Core::HelpManager::HelpViewerLocation)'
      .../build-ConnectedCreator-debug/src/../../plugin-telemetry/src/datasources/helppagesdatasource.cpp:42: undefined reference to `Help::Internal::HelpManager::instance()'
      /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: .obj/debug-shared/helppagesdatasource.o: in function `QMetaObject::Connection QObject::connect<void (Help::Internal::HelpManager::*)(QUrl const&, Core::HelpManager::HelpViewerLocation), void (HelpPagesDataSource::*)(QUrl const&)>(QtPrivate::FunctionPointer<void (Help::Internal::HelpManager::*)(QUrl const&, Core::HelpManager::HelpViewerLocation)>::Object const*, void (Help::Internal::HelpManager::*)(QUrl const&, Core::HelpManager::HelpViewerLocation), QtPrivate::FunctionPointer<void (HelpPagesDataSource::*)(QUrl const&)>::Object const*, void (HelpPagesDataSource::*)(QUrl const&), Qt::ConnectionType)':
      /home/aleksey/Qt/5.11.2/gcc_64/include/QtCore/qobject.h:254: undefined reference to `Help::Internal::HelpManager::staticMetaObject'
      collect2: error: ld returned 1 exit status
      make[1]: *** [Makefile.connectedcreatorplugin:398: ../../qt-creator-debug/lib/qtcreator/plugins/libConnectedCreatorPlugin.so] Error 1
      make: *** [Makefile:71: sub-src-connectedcreatorplugin-pro-make_first] Error 2
      11:06:40: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project connectedcreator (kit: Desktop Qt 5.11.2 GCC 64bit)
      When executing step "Make"

       What is the problem could be? Bug? How to solve?

      Attachments

        1. helpmanager.h.diff
          0.9 kB
          user-45b5b
        2. helpmanager.cpp.diff
          0.6 kB
          user-45b5b

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              con Eike Ziller
              jirauser39314 user-45b5b (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes