Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Qt Creator plugin: undefined reference to snippets

  • 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

  • Qt Champions 2018

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

    I added the dependency to texteditor

    How? Can you show?

  • In my i added it in dependencies section:

    QTC_PLUGIN_NAME = KSClassGenerator
    # nothing here at this time

    coreplugin \
    projectexplorer \

    # optional plugin dependencies. nothing here at this time


    I want to do something like this and further more:

    TextEditor::Internal::SnippetsCollection *collection = TextEditor::Internal::SnippetsCollection::instance();
    const int size = collection->totalActiveSnippets("C++");

Log in to reply