Results 1 to 5 of 5

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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....

  2. #2
    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

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.