Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator subdirs vs. libraries

QtCreator subdirs vs. libraries

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 3.0k Views 1 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.
  • T Offline
    T Offline
    talmage
    wrote on last edited by
    #1

    I am using QtCreator 2.2.1 to create an application for Maemo and Symbian^3 phones. I refactored my code into a supporting library and the application. Now I need help making QtCreator build and link with the library. I have read the documentation and followed it as closely as I can. It does not work for me.

    I tried adding a library to the application project. In the wizard, I get as far as specifying the directory of the library's .pro file. The wizard will not let me select a library. Even if it did, it is not clear how to specify the library name and location in a platform-agnostic way.

    I tried making a subdirs project and adding my library and app directories to it:

    SUBDIRS = ../libraryprojectdir ../appprojectdir

    This let me compile but not link. There seems to be no way to specify the library build directory for each of my target platforms.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

      I would suggest to have a lib dir somewhere in your build tree and specify $DESTDIR for the lib accordingly. Then you can be sure that the lib will be in that directory, regardless of the platform. Also, I case you didn't know, you can use CONFIG += ordered to make sure your the subdirs are built in the order you specify (i.e. you lib is built first).

      1 Reply Last reply
      0

      • Login

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