Results 1 to 2 of 2

Thread: Make shared libraries available in QtScript

  1. #1
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Make shared libraries available in QtScript

    I have collection of shared libraries, each one specialized for individual calculation process.
    I have headers defining exported class for each of these libraries , but not the source code of the library itself.

    My question is:
    Is it possible to make these libraries available for QtScript in run-time without statically compiling there interfaces with my application?

    The only approach I could come up is:
    1. For each library create a wrapper in Qt that wraps shared library interface with Qt plugin conventions, making this wrapper a Qt plugin.

    2. My app can read new Qt header and become "aware" of the plugin interface class

    3. Somehow "map" the call to the class to the internal generic class.

    May be there is a better, or completely different approach?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Make shared libraries available in QtScript

    It's possible in general but you need to do pretty much coding unless the classes inherit QObject. Read QtScript docs about mapping to and from C++ objects and ask questions about specific things when you encounter problems.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. qobject_cast<T> in shared libraries...
    By seim in forum Qt Programming
    Replies: 7
    Last Post: 5th January 2009, 18:23
  2. Deployment (shared libraries)
    By amagdy.ibrahim in forum Qt Programming
    Replies: 5
    Last Post: 26th June 2008, 21:55
  3. Related to Packaging of Qt4 Application
    By archanasubodh in forum Installation and Deployment
    Replies: 1
    Last Post: 21st March 2008, 14:55
  4. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  5. Qt 3.3 libraries
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st December 2006, 17:25

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.