Results 1 to 5 of 5

Thread: Intergrating Library Packages

  1. #1
    Join Date
    Aug 2009
    Posts
    29
    Thanked 1 Time in 1 Post

    Default Intergrating Library Packages

    Goodday fellow qt'ers.

    First let me start by saying that i looked everywhere for an asnwer but none solves mine.

    ATM i downloaded 3 libraries they are called:

    libIconv
    libUSB
    libMTP

    These packages can just be found on internet and are used to use the MTP from windows.

    Now what i want to know is how i can use these library packages in QT.

    Since in libiconv and libmtp are configure files wich i can use with msys for mingw32 but i don't know if this is the correct way of doing it PLUS that libusb is an executable without the setting files.

    so can please anyone help me so that i can use these 3 libraries in QT so that i can connect with an MTP device.

    thanx in advance and if you need more info about anything feel free to ask.

    regards Baasie

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Intergrating Library Packages

    as Qt is just a bunch of C++ classes (and some helpful tools) you write your programs in C++. So compile your libraries or find suitable compiled versions, add those libraries to your project (*.pro):
    Qt Code:
    1. LIBS += -Lpath/to/library/dir -lnameofthelibrary
    To copy to clipboard, switch view to plain text mode 
    add paths to headers:
    Qt Code:
    1. INCLUDEPATH += path/to/headers
    To copy to clipboard, switch view to plain text mode 
    and use them in your project.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Aug 2009
    Posts
    29
    Thanked 1 Time in 1 Post

    Default Re: Intergrating Library Packages

    So all i need to do is link those 3 .dll's and i don't need to add the .a/.lib files ?


    example
    Qt Code:
    1. LIBS += -Llibs/libiconv/lib/.libs -llibiconv-2.dll
    To copy to clipboard, switch view to plain text mode 


    like this ?

    but wich files do i need to add to the headers like you mentioned?

    already thanx in advance

  4. #4
    Join Date
    Dec 2007
    Posts
    627
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Intergrating Library Packages

    Quote Originally Posted by Baasie View Post
    So all i need to do is link those 3 .dll's and i don't need to add the .a/.lib files ?
    This depends upon how DLL is created. Sometime we may need to include the libs files at the compile time and supplying DLL at run time. But you can skip including lib files. Just include the header(If available). Other wise you need to manually resolve the DLL symbols. For that you can use QLibrary class.

    Quote Originally Posted by Baasie View Post
    LIBS += -Llibs/libiconv/lib/.libs -llibiconv-2.dll
    like this ?
    No, never use .dll or .lib. Just use the name.

    Quote Originally Posted by Baasie View Post
    but wich files do i need to add to the headers like you mentioned
    If header is available, then you need to include the libs at compile time. Otherwise use QLibrary to resolve the DLL symbols and using them in your application.

  5. #5
    Join Date
    Aug 2009
    Posts
    29
    Thanked 1 Time in 1 Post

    Thumbs up Re: Intergrating Library Packages

    Okey gonna try what you told me,

    i have found the headers so i am gonna see if it works

    many thanx for your quick reply on my post.

    /bow


    regards Baasie

Similar Threads

  1. Extending a plugin in a static library
    By ultim8 in forum Qt Programming
    Replies: 5
    Last Post: 25th March 2010, 15:10
  2. Library QSerialDevice v 0.1.0 released
    By kuzulis in forum Qt Programming
    Replies: 0
    Last Post: 15th September 2009, 06:47
  3. Replies: 1
    Last Post: 13th August 2009, 16:32
  4. plugin in a library
    By alisami in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2008, 17:21
  5. Replies: 1
    Last Post: 5th March 2007, 20:50

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.