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. Not able to load dll
Forum Updated to NodeBB v4.3 + New Features

Not able to load dll

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.4k 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.
  • A Offline
    A Offline
    AmitSingh
    wrote on last edited by
    #1

    Hi,

    I am not able to load dll. "bool okLoad = mylib.load();" is returning false.

    I have tried following, but none of them are working:

    1.) QLibrary mylib("abc.dll");
    bool okLoad = mylib.load();

    2.) QLibrary mylib("C:/Simulator/Package/trunk/Simu/abc.dll");
    bool okLoad = mylib.load();

    3.) I have added "LIBS += abc.dll " in .pro file too

    I don't know I am not able to load dll.

    Thanks in advance

    Good coder codes, great reuses !

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      "LIBS += abc.dll" is nonsense, remove it.

      And please provide more info:
      What is this DLL for?
      Does it contain C-exported methods? If not is the compiler version the same?
      What does QLibrary::errorString() return after the you have called load()?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AmitSingh
        wrote on last edited by
        #3

        QLibrary::errorString() returns :
        "Cannot load library abc.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

        I can see that corresponding header file have C-exported methods.

        Good coder codes, great reuses !

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          are all symbols exported by the DLL C-exported? As is said if not all symbols are C-exported the compiler (and probably some specific settings) need to match in order to successful load the library!
          Where did you get the DLL from?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AmitSingh
            wrote on last edited by
            #5

            Danke raven-work !
            Your questions solved my half of the problem. :)

            Good coder codes, great reuses !

            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