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. Can not load my .dll file in the app that built by static-release when execute in folder
Forum Updated to NodeBB v4.3 + New Features

Can not load my .dll file in the app that built by static-release when execute in folder

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 192 Views
  • 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.
  • C Offline
    C Offline
    CKShih
    wrote on last edited by CKShih
    #1

    Hi, all

    I developed an application and another my library for the former app. The library is dynamically load using QLibrary.
    And everything went fine in debug(app)+debug(lib) and release+release whether if I executed the app in QT(F5) or folder .

    However, when I built my app as "static-release" and loaded my static-release lib(means that static for QT libs. I still want use my library as dynamic loading), the app report "Cannot load library".
    Strangely This fail is ONLY when I run the app in folder, but all be fine when run in QT(F5).
    I had checked the dll file is definitely exist under my app folder(using QFile::exists()), BUT the fail still reported.
    Can anyone help me to solve this question? Although release+release is work for me, but I do not want to attach QT dll in the app folder.

    ps, I know when I configured, it would show about this :

    WARNING: Using static linking will disable the use of dynamically loaded plugins.

    I don't know whether if this cause my fail. Please tell me if my own library (dll) is considered as the plugin.

    Thanks!

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You should set the env var QT_DEBUG_PLUGINS to 1 and take a look at the output.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      C 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        You should set the env var QT_DEBUG_PLUGINS to 1 and take a look at the output.

        C Offline
        C Offline
        CKShih
        wrote on last edited by
        #3

        @Christian-Ehrlicher Thx for your reply.

        I set the QT_DEBUG_PLUGINS to 1 in env
        218264df-a298-4a6b-a75e-dbe40a9dc802-圖片.png

        But I don't know how to get message. I used CONFIG += console, but there is no any message. Thanks.

        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