Results 1 to 2 of 2

Thread: Using User Defined Libraries

  1. #1
    Join Date
    Mar 2008
    Posts
    68
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Using User Defined Libraries

    Hi,

    I have written a C application, which i have made as a shared library.
    How to call the functions within this library in my Qt application?

    --csvivek.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Using User Defined Libraries

    Qt applications are just plain C++ applications, so you have to include proper header and link your executable with the library.

    If you use qmake and the library you want to use is libsomething.so placed in /some/dir/lib and the headers are in /some/dir/include, you have to add:
    Qt Code:
    1. LIBS += -L/some/dir/lib -lsomething
    2. INCLUDEPATH += /some/dir/include
    To copy to clipboard, switch view to plain text mode 
    to your .pro file.

Similar Threads

  1. User Defined Signal?
    By rajeshs in forum Newbie
    Replies: 2
    Last Post: 18th December 2007, 11:42
  2. How to suppress user defined events in processEvents()
    By Artschi in forum Qt Programming
    Replies: 5
    Last Post: 5th July 2007, 10:17
  3. Replies: 4
    Last Post: 26th June 2007, 19:19
  4. Qt 3.3 libraries
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st December 2006, 17:25
  5. is it possible to stay on a user defined infinite loop?
    By mahe2310 in forum Qt Programming
    Replies: 9
    Last Post: 24th March 2006, 14:29

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.