Results 1 to 4 of 4

Thread: Parsing and importing a dll in Qt4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    MacOS X Windows

    Default Parsing and importing a dll in Qt4

    Hello,

    I have to work on a data acquisition program. My programs acquire and display data, but it relies on external libraries to process data. So my main problem now is finding a cross-platform way to load a library and parse its exported functions so the user could choose a function and select its parameters.

    I've looked at the documentation and QLibrary only seems to be able to resolve a known function.

    Since it's a user library, I can't be sure of the language it was programmed in. (Let's assume it's C++ without Qt)

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Parsing and importing a dll in Qt4

    QLibrary is the way to go and you must assume a language, or rather, a call strategy.

  3. #3
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Parsing and importing a dll in Qt4

    Quote Originally Posted by e8johan
    QLibrary is the way to go and you must assume a language, or rather, a call strategy.
    Since the library is in C++, you are going to have to mangle the function names in order to resolve them too. You need to Google for this because it's very compiler/linker-specific. I don't envy-you!
    Save yourself some pain. Learn C++ before learning Qt.

  4. #4
    Join Date
    Feb 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    MacOS X Windows

    Default Re: Parsing and importing a dll in Qt4

    Well, if it is impossible to search for function names in dll, is it possible lo let the user enter the prototype of the function to call ?
    I want to allow user to select how many parameters (and to let them specify types) the external function will accept. I guess I can't use typedef... Any ideas on how doing that ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.