Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Creator: how to split a project into static libraries?
Forum Updated to NodeBB v4.3 + New Features

Qt Creator: how to split a project into static libraries?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rmam
    wrote on last edited by
    #1

    I'm developing a small pet project which is basically a Qt GUI for a domain model. The whole project is currently organized as a single source tree where the domain model is stored in a dedicated subdirectory. I would like to turn it into a separate module to be included in the project as a static library. Does anyone know what's the best way to use Qt Creator to convert portions of a project into modules by converting them to static libraries?

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      The SUBDIRS template would be the right choice.

      Take a look at this wiki entry. It shows it pretty nicely.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • StevenFSS Offline
        StevenFSS Offline
        StevenFS
        wrote on last edited by StevenFS
        #3

        @rmam Check this thread for additional details on SUBDIRS and libraries. @SGaist helped me with a similar question, you may find the additional details useful. (Thanks SGaist! ;-) )

        https://forum.qt.io/topic/82884/how-to-include-shared-code-headers-from-another-directory-src-widget-using-src-common/2

        Following SGaist's answers, I believe this blog-post filled in a missing link for me. http://jingfenghanmax.blogspot.com/2010/01/use-qmake-include-file-pri.html

        Good luck,

        C++ Software Engineer

        1 Reply Last reply
        3

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved