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. Create plugin error: LNK1181: cannot open input file 'Cored4.lib'
Forum Updated to NodeBB v4.3 + New Features

Create plugin error: LNK1181: cannot open input file 'Cored4.lib'

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 922 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
    Marvin659
    wrote on last edited by
    #1

    I followed the "http://doc.qt.io/qt-5/plugins-howto.html" to create plugin for QT Creator. I have QT 5.11.2 installed. I have also download the source of QT Creator from git and build it using VS2017 (64bits). The version for QT Creator is 4.7.1.

    Then I started to follow the guide to create my first plugin. I have QT creator source/build pointing to correct directory (D:/workspace/qt-creator and D:/workspace/qtcreator-build)

    But I got the following error when I build my plugins in QT Creator

    11:01:58: Running steps for project myplugin...
    11:01:58: Configuration unchanged, skipping qmake step.
    11:01:58: Starting: "D:\Qt\Qt5.11.2\Tools\QtCreator\bin\jom.exe"
    D:\Qt\Qt5.11.2\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /INCREMENTAL:NO /DLL /SUBSYSTEM:CONSOLE /VERSION:4.7 /OUT:C:\Users\mleung\AppData\Local\QtProject\qtcreator\plugins\4.7.82\MyPlugind4.dll @C:\Users\mleung\AppData\Local\Temp\MyPlugind4.dll.21152.16.jom
    LINK : fatal error LNK1181: cannot open input file 'Cored4.lib'
    jom: D:\workspace\build-marvintry1-Desktop_Qt_5_11_2_MSVC2017_64bit-Debug\Makefile.Debug [C:\Users\mleung\AppData\Local\QtProject\qtcreator\plugins\4.7.82\MyPlugind4.dll] Error 1181
    jom: D:\workspace\build-marvintry1-Desktop_Qt_5_11_2_MSVC2017_64bit-Debug\Makefile [debug] Error 2
    11:01:58: The process "D:\Qt\Qt5.11.2\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project myplugin (kit: Desktop Qt 5.11.2 MSVC2017 64bit)
    When executing step "Make"
    11:01:58: Elapsed time: 00:00.

    Here is my project:
    DEFINES += MARVIN1STPLUGINS_LIBRARY

    marvin1stPlugins files

    SOURCES +=
    marvin1stpluginsplugin.cpp

    HEADERS +=
    marvin1stpluginsplugin.h
    marvin1stplugins_global.h
    marvin1stpluginsconstants.h

    Qt Creator linking

    Either set the IDE_SOURCE_TREE when running qmake,

    or set the QTC_SOURCE environment variable, to override the default setting

    isEmpty(IDE_SOURCE_TREE): IDE_SOURCE_TREE = $$(QTC_SOURCE)
    isEmpty(IDE_SOURCE_TREE): IDE_SOURCE_TREE = "D:/workspace/qt-creator"

    Either set the IDE_BUILD_TREE when running qmake,

    or set the QTC_BUILD environment variable, to override the default setting

    isEmpty(IDE_BUILD_TREE): IDE_BUILD_TREE = $$(QTC_BUILD)
    isEmpty(IDE_BUILD_TREE): IDE_BUILD_TREE = "D:/workspace/qtcreator-build"

    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 OS X

    USE_USER_DESTDIR = yes

    If the plugin can be depended upon by other plugins, this code needs to be outsourced to
    <dirname>_dependencies.pri, where <dirname> is the name of the directory containing the
    plugin's sources.

    QTC_PLUGIN_NAME = marvin1stPlugins
    QTC_LIB_DEPENDS +=
    # nothing here at this time

    QTC_PLUGIN_DEPENDS +=
    coreplugin

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

    End _dependencies.pri contents

    include($$IDE_SOURCE_TREE/src/qtcreatorplugin.pri)

    Anyone could help?

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

      Hi and welcome to devnet,

      Do you have that file somewhere in your hard drive ?

      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

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved