Compiling own QtCreator Plugin fails



  • 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
    

    @


  • Lifetime Qt Champion

    Hi,

    Where is extensionsystem/iplugin.h located ?



  • 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



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



  • 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?



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



  • 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)
    @



  • ++++push++++



  • No one any idea?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.