Results 1 to 2 of 2

Thread: Best way of creating a library in qt

  1. #1
    Join Date
    Sep 2012
    Posts
    31
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Best way of creating a library in qt

    Hi, I am currently developing a library of headers to be used by other qt projects. I am thinking of the best way to implement it.

    I created a .pro file that will be the library, for example:

    MyLibrary.pro

    ..in my Include folder are the following:
    1) ProductAHeaders
    2) ProductBHeaders

    both holders contains the same header file names but its content varies since they are different products.

    to put it simply I will be offering an API that will give the desired headers and parameters depending on the type of product (either ProductA or Product B)

    ..should I use a shared library , dynamic or static library.

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

    Default Re: Best way of creating a library in qt

    a shared library IS a dynamic library. If you make a static lib, then you have to compile your other app with the library every time.
    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. Creating Library which includes QML files
    By arunpk in forum Qt Programming
    Replies: 0
    Last Post: 10th September 2012, 11:19
  2. creating and using static library
    By indomie_seleraku in forum Newbie
    Replies: 3
    Last Post: 18th December 2010, 09:05
  3. Creating Qt shared library for non-Qt applications
    By dimitar in forum Qt Programming
    Replies: 2
    Last Post: 25th November 2010, 11:46
  4. Creating Library using QTCreator (hiddevice)
    By AlphaWolfXV in forum Qt Programming
    Replies: 0
    Last Post: 2nd February 2010, 13:02
  5. Creating Static library with QT
    By QPlace in forum Qt Programming
    Replies: 2
    Last Post: 21st December 2008, 04:50

Tags for this Thread

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.