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. Qt Creator plugin: undefined reference to snippets
Forum Updated to NodeBB v4.3 + New Features

Qt Creator plugin: undefined reference to snippets

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 418 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.
  • M Offline
    M Offline
    Marc Ladnar
    wrote on last edited by Marc Ladnar
    #1

    Hi,

    I try to write a plugin for QtCreator and wanted to use the snippets in my plugin. Defined in namespace Internal in TextExitor plugin I suspect that I'm not able to use them.
    Is this right?
    I only get a n error like this:
    undefined reference to `TextEditor::Internal::SnippetsCollection::instance()
    I added the dependency to texteditor, but that did not change anything regarding this error.
    I'm currently bound to Creator 3.0.1 and Qt4.8.5, but I hope you can still give me some information about it.

    Thanks and regards, Marc

    jsulmJ 1 Reply Last reply
    0
    • M Marc Ladnar

      Hi,

      I try to write a plugin for QtCreator and wanted to use the snippets in my plugin. Defined in namespace Internal in TextExitor plugin I suspect that I'm not able to use them.
      Is this right?
      I only get a n error like this:
      undefined reference to `TextEditor::Internal::SnippetsCollection::instance()
      I added the dependency to texteditor, but that did not change anything regarding this error.
      I'm currently bound to Creator 3.0.1 and Qt4.8.5, but I hope you can still give me some information about it.

      Thanks and regards, Marc

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Marc-Ladnar said in Qt Creator plugin: undefined reference to snippets:

      I added the dependency to texteditor

      How? Can you show?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Marc Ladnar
        wrote on last edited by Marc Ladnar
        #3

        In my plugin.pro i added it in dependencies section:

        QTC_PLUGIN_NAME = KSClassGenerator
        QTC_LIB_DEPENDS += \
        # nothing here at this time

        QTC_PLUGIN_DEPENDS += \
        coreplugin \
        projectexplorer \
        texteditor

        QTC_PLUGIN_RECOMMENDS += \
        # optional plugin dependencies. nothing here at this time

        =====================================================0

        I want to do something like this and further more:

        TextEditor::Internal::SnippetsCollection *collection = TextEditor::Internal::SnippetsCollection::instance();
        const int size = collection->totalActiveSnippets("C++");
        
        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