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. Compiling own QtCreator Plugin fails
Forum Updated to NodeBB v4.3 + New Features

Compiling own QtCreator Plugin fails

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 7.3k 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.
  • R Offline
    R Offline
    rubikon
    wrote on last edited by
    #1

    I'm trying to create my own QtCreator Plugin by following "this":http://doc-snapshot.qt-project.org/qtcreator-extending/first-plugin.html guide.

    So I cloned "this":https://git.gitorious.org/qt-creator/qt-creator.git repo and checked out the v2.8.1 tagged commit (c3ed746c).

    Then I copied my QtCreator 2.8.1 directory and created a new Qt Creator Plugin project.

    Then I create a new file in my project directory called MyPlugin.json.

    If I try to compile my plug in I get this error:
    @

    e:\qtprojects\build-myplugin-desktop_qt_5_1_1_msvc2012_32bit-debug\debug../../MyPlugin/mypluginplugin.h(6) : fatal error C1083: Cannot open include file: "extensionsystem/iplugin.h": No such file or directory
    jom: E:\QtProjects\build-MyPlugin-Desktop_Qt_5_1_1_MSVC2012_32bit-Debug\Makefile.Debug [debug\moc_mypluginplugin.obj] Error 2
    jom: E:\QtProjects\build-MyPlugin-Desktop_Qt_5_1_1_MSVC2012_32bit-Debug\Makefile [debug] Error 2
    10:56:51: The process "E:\Qt\Qt5\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project myplugin (kit: Desktop Qt 5.1.1 MSVC2012 32bit)
    When executing step 'Make'
    10:56:51: Elapsed time: 00:01.
    @
    What do I have to do to make it work?

    I didn't modify any of the wizard created files.

    This is the directory structure:
    @
    E:\QtProjects_QtCreatorPlugIns> tree

    +---qt-creator
    ¦   +---bin
    ¦   +---dist
    ¦   +---doc
    ¦   +---lib
    ¦   +---qbs
    ¦   +---scripts
    ¦   +---share
    ¦   +---srcn64interrupt
    ¦   +---testsster
    +---QtCreator
    ¦   +---bin
    ¦   +---lib0
    ¦   +---share
    

    @

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

      Hi,

      Where is extensionsystem/iplugin.h located ?

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

        I found it in E:\QtProjects_QtCreatorPlugIns\qt-creator\src\libs.

        So I added the following line to my pro file but still getting the same error message:

        win32:INCLUDEPATH += E:/QtProjects/_QtCreatorPlugIns/qt-creator/src/libs

        1 Reply Last reply
        0
        • B Offline
          B Offline
          butterface
          wrote on last edited by
          #4

          AFAIK the plugins will work in release mode anyway. Did you try that?

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rubikon
            wrote on last edited by
            #5

            That was a good hint. Compiling works in release mode but I get a linking error:

            LNK1181: cannot open input file 'Core.lib'

            I can not find this lib. Do I have to build Qt Creator myself or is there a way without doing this?

            1 Reply Last reply
            0
            • B Offline
              B Offline
              butterface
              wrote on last edited by
              #6

              No, you don't need to build it yourself. Check your configuration where your link libraries are or maybe you can post it.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rubikon
                wrote on last edited by
                #7

                I don't have to build Qt Creator, thats good news :-)

                What do you mean by 'configuration where your link libraries are'?

                I can't find core.lib in my filesystem...

                This is my .pro file, maybe this helps:
                @
                DEFINES += MYPLUGIN_LIBRARY

                MyPlugin files

                SOURCES += mypluginplugin.cpp

                HEADERS += mypluginplugin.h
                myplugin_global.h
                mypluginconstants.h

                win32:INCLUDEPATH += E:/QtProjects/_QtCreatorPlugIns/qt-creator/src/libs

                Qt Creator linking

                set the QTC_SOURCE environment variable to override the setting here

                QTCREATOR_SOURCES = $$(QTC_SOURCE)
                isEmpty(QTCREATOR_SOURCES):QTCREATOR_SOURCES=E:/QtProjects/_QtCreatorPlugIns/qt-creator

                set the QTC_BUILD environment variable to override the setting here

                IDE_BUILD_TREE = $$(QTC_BUILD)
                isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=E:/QtProjects/_QtCreatorPlugIns/QtCreator

                uncomment to build plugin into user config directory

                <localappdata>/plugins/<ideversion>

                where <localappdata> is e.g.

                "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later

                "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux

                "~/Library/Application Support/QtProject/Qt Creator" on Mac

                USE_USER_DESTDIR = yes

                PROVIDER = MyCompany

                include($$QTCREATOR_SOURCES/src/qtcreatorplugin.pri)
                @

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  rubikon
                  wrote on last edited by
                  #8

                  ++++push++++

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    rubikon
                    wrote on last edited by
                    #9

                    No one any idea?

                    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