Results 1 to 5 of 5

Thread: how to create library from .pro file(project file and how to use library in applicati

  1. #1
    Join Date
    Nov 2006
    Posts
    37
    Thanks
    1

    Default how to create library from .pro file(project file and how to use library in applicati

    helo, i have one LHMail project file
    i want to create library file and want to use it in my application
    now how to create library file and how to use this library in my application
    what configuration i have to required for bulding library and using it from application
    Best Regards,
    Amit

  2. #2
    Join Date
    Feb 2007
    Location
    Philadelphia, USA
    Posts
    255
    Thanks
    43
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to create library from .pro file(project file and how to use library in appli

    Quote Originally Posted by amit_pansuria View Post
    helo, i have one LHMail project file
    i want to create library file and want to use it in my application
    now how to create library file and how to use this library in my application
    what configuration i have to required for bulding library and using it from application
    Best Regards,
    Amit
    In your library project file, use TEMPLATE=lib. If you want a create a shared library use CONFIG += dll, and if you want to create a static library use CONFIG += staticlib.

    Once the library is created, you can use LIBS += -L searchpath -l libname in your main application project file (see Qt docs). Be sure to #include the header file for your library....

  3. #3
    Join Date
    Nov 2006
    Posts
    37
    Thanks
    1

    Default Re: how to create library from .pro file(project file and how to use library in appli

    Quote Originally Posted by magland View Post
    In your library project file, use TEMPLATE=lib. If you want a create a shared library use CONFIG += dll, and if you want to create a static library use CONFIG += staticlib.

    Once the library is created, you can use LIBS += -L searchpath -l libname in your main application project file (see Qt docs). Be sure to #include the header file for your library....
    suppose i in my library project file i use TEMPLATE = lib .
    now i want to create lib file then i have to give
    #qmake project file
    # make
    if it will successfully compile then it will build .lib file
    this is right or not.
    and where i have to locate the lib file

    Amit

  4. #4
    Join Date
    Aug 2006
    Posts
    26
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to create library from .pro file(project file and how to use library in appli

    I'm working on using QT's plugin system to create libraries for my software. Here is the link to the doc section that talks about QT Plugins:

    http://doc.trolltech.com/4.3/plugins-howto.html

    Here is a post I made earlier with sample code for a plugin:
    http://www.qtcentre.org/forum/f-qt-p...ghlight=plugin

    *Note: You will need to fix the createWidget declaration in interface.h by making it a pure virtual function, like wysota was saying .

    Honestly, after reading through the plugin page, going over the paint example in the docs and creating a sample, it is really easy to extend your app through the QT Plugins.

  5. #5
    Join Date
    Dec 2009
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to create library from .pro file(project file and how to use library in appli

    Is it possible to convert it for qtcreator 1.3 ????

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.