Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. [Solved] Load Fortran DLL (Microsoft Digital Visual Fortran)
Forum Updated to NodeBB v4.3 + New Features

[Solved] Load Fortran DLL (Microsoft Digital Visual Fortran)

Scheduled Pinned Locked Moved C++ Gurus
3 Posts 2 Posters 4.5k 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
    Azghar
    wrote on 17 Jan 2011, 09:30 last edited by
    #1

    Hi,

    Please help me... This is very urgent !!!

    I have create a fortran DLL using Microsoft Digital Visual Fortran Studio. I am trying to load DLL in my Qt application and DLL is not loading... Below is my code

    @
    QString libPath(QString(QApplication::applicationDirPath() + QDir::separator() + "final.dll"));
    QLibrary myLib(libPath);
    bool okLoad = myLib.load(); // check load DLL file successful or not
    bool ok = myLib.isLoaded(); // check is DLL file loaded or not

    typedef void (*FINAL)();
    FINAL mFINAL = (FINAL) myLib.resolve("FINAL");
    if (mFINAL)
    {
    int c = 0;
    FINAL();
    }
    myLib.unload();
    @

    when I run above code ... myLib.load() is returning false

    Please let me know if Qt is compatible with DLL created with Microsoft Digital Visual Fortran Studio.

    thanks in advance,
    Azghar

    EDIT (Gerolf) sourounded code by tags

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on 17 Jan 2011, 09:43 last edited by
      #2

      Have you check, if there is some debug output when you call myLib.load()?
      Have you checked with dependecy walker, if all libs that are needed are available?
      Which compiler do you use?

      By the way, Please sourround code by @ tags.

      EDIT:

      in general, it should not be a Qt issue, as Qt is just a set of libaries, you load to your C++ code.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Azghar
        wrote on 17 Jan 2011, 10:26 last edited by
        #3

        Hi Gerolf,

        Thanks a lot for help. I used dependency walker and found that DFORRT.DLL was missing. I copied this DLL to System 32 directory. Now I am able to load DLL and run function.

        thanks,
        Azghar

        1 Reply Last reply
        0

        1/3

        17 Jan 2011, 09:30

        • Login

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