Results 1 to 4 of 4

Thread: Changing using the library LTDL with static library created with Qt

  1. #1
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    106
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Changing using the library LTDL with static library created with Qt

    Hello to all. I have a project in which you use a library created using LTDL. This code has the following:
    Qt Code:
    1. lt_dlhandle handle = NULL;
    2.  
    3. char libname[256];
    4. sscanf( lib, "%s %*s", libname );
    5.  
    6. if(( handle = lt_dlopenext( libname ) ))
    7. {
    8. model_callback_t initfunc = (model_callback_t)lt_dlsym( handle, "Init" );
    9.  
    10. // pass complete string into initfunc
    11. AddCallback( ..., initfunc, ...);
    12. }
    To copy to clipboard, switch view to plain text mode 
    where lib is the name of the library created using LTDL. I want to change a piece of code which I quoted above, with a piece of code where the same library was created using Qt.
    I would therefore will replace the code
    Qt Code:
    1. handle = lt_dlopenext (libname)
    To copy to clipboard, switch view to plain text mode 
    and
    Qt Code:
    1. lt_dlsym( handle, "Init" )
    To copy to clipboard, switch view to plain text mode 
    . The Init is the name of a library function created using LTDL.
    Can you help me ?

  2. #2
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Changing using the library LTDL with static library created with Qt

    Not without knowing what lt_dlopenext and lt_dlsym do. Did you not think that might be kind of important?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    106
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing using the library LTDL with static library created with Qt

    lt_dlopenext and lt_dlsym are 2 functions LTDL which serve respectively to obtain handle to the library LTDL and the function Init (one library made ​​using LTDL). Mode instead of using Qt to create and use your own static library, I do not know where to start to do the same thing LTDL. This transformation is necessary because I want to make a port of the entire project using Qt. This project is Player-Stage that I mentioned in another post in which I asked about FLTK. I would be able to compile Qt, but there is this part

  4. #4
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Changing using the library LTDL with static library created with Qt

    Do you just want to use the library in Qt? If yes, then just use it!

    If you want to re-write everything, then maybe look at Qpluginloader
    Last edited by amleto; 20th December 2012 at 13:29.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Export created files in shared library into separate folder
    By alizadeh91 in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2012, 10:49
  2. Replies: 2
    Last Post: 19th February 2011, 11:26
  3. Replies: 1
    Last Post: 18th February 2011, 11:08
  4. how to use static library in qt4?
    By hashb in forum Qt Programming
    Replies: 9
    Last Post: 28th October 2009, 12:46
  5. HOW TO - created and use shared library (.so)
    By big4mil in forum Qt Programming
    Replies: 4
    Last Post: 25th November 2006, 23:11

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.