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. Project dependency?
Forum Updated to NodeBB v4.3 + New Features

Project dependency?

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 1.3k 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.
  • P Offline
    P Offline
    pendulum
    wrote on last edited by
    #1

    I have 2 project files A and B. Project A depends on Project B which is configured as a static lib. I couldn't find the option to specify the linker's search path but I did find the project dependency option so I set project b as a dependency of project a thinking this will accomplish this. However, upon building project A I got an undefined reference error. I assume setting the dependency doesn't make the linker look for the object files of project b. If so what should I do to fix the error?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goblincoding
      wrote on last edited by
      #2

      The information you provided are a bit sketchy :)

      Without knowing what IDE you're using etc etc the best I can do is point you in the direction of qMake. Have a look at the LIBS and INCLUDEPATH
      variables:

      https://qt-project.org/doc/qt-5/qmake-variable-reference.html#libs
      https://qt-project.org/doc/qt-5/qmake-variable-reference.html#includepath

      Hope that helps :)

      http://www.goblincoding.com

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pendulum
        wrote on last edited by
        #3

        I've added the project target into LIBS, added in the header search path into INCLUDEPATH and this solves the problem.

        I apologize if the way I worded the problem comes out as rather ambiguous. I'm using the latest version of Qt Creator (of course). I am not aware of other ide that is tailored for Qt development which integrates well with qmake and moc.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goblincoding
          wrote on last edited by
          #4

          No problem, some tools just allow you to add dependencies without having to modify the .pro file manually.

          If this solved it for you, please mark the thread accordingly :)

          http://www.goblincoding.com

          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