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. why the dll file isn't loaded?

why the dll file isn't loaded?

Scheduled Pinned Locked Moved General and Desktop
dll
10 Posts 3 Posters 2.7k Views 2 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.
  • L Offline
    L Offline
    LeaA
    wrote on last edited by
    #1

    hi,

    i want to load a dll file to my program,but it not have been loaded..
    the code as below:

    QLibrary hMod ("CoreDll");
    hMod.load();
    bool ok= hMod.isLoaded();

    the ok var is always false..
    there is anybody who knows why it happens?

    tnx!

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      What I encountered is that the automatic search function of QLibrary didn't do what I expected. It needed the .dll postfix.
      Also make really sure your library is in the same folder as your executable. So if in de debug mode, place it in the shadow build debug folder. It will not look into your project folder when you build shadow builds.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LeaA
        wrote on last edited by
        #3

        i did it and it doesn't works yet.. the dll don't loaded

        1 Reply Last reply
        0
        • L Offline
          L Offline
          LeaA
          wrote on last edited by
          #4

          the dll created in VS, maybe it's the problem?...

          1 Reply Last reply
          0
          • L Offline
            L Offline
            LeaA
            wrote on last edited by
            #5

            i loaded the library and it works,the dll was loaded.
            but, the function that i want to run throws segmentation fault ..

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

              Hi,

              What compiler did you use to create the DLL and which one are you using for your application ?

              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
              • L Offline
                L Offline
                LeaA
                wrote on last edited by LeaA
                #7

                how can i know it?
                the dll compilied in VS 2008 and the app in qt 5.3.1

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

                  So, is the your Qt 5.3.1 also compiled with VS2008 ?

                  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
                  • L Offline
                    L Offline
                    LeaA
                    wrote on last edited by
                    #9

                    No.
                    should i?
                    why?

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

                      Yes it should.

                      Visual Studio rule number one: Everything must be compiled with the same version of Visual Studio.

                      The different versions of Visual Studio are not compatible one with the other.

                      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