Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. (Visual Studio) Project build order/dependencies, Should they work ?

(Visual Studio) Project build order/dependencies, Should they work ?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiodevopsquestion
8 Posts 4 Posters 3 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.
  • M Offline
    M Offline
    Maximilien
    wrote on last edited by
    #1

    In Visual Studio (latest), C++ solution. I have a project like : project\app project\lib1 project\lib2 project\lib3 project\util

    app <-- lib1 <-- util
    <-- lib2
    <-- lib3

    lib1 is dependant on util and app is dependant on lib1. util needs to be build before lib1 and lib1 before app. In the project dependencies window, I select lib1 and then check the util dependency. I've also looked at the project references and my lib1 is setup correctly to reference the util library. When rebuilding lib1, I expected util to be build before. There must be something I'm missing. (obviously) Thanks.

    CI/CD = Continuous Impediment/Continuous Despair

    Greg UtasG H 2 Replies Last reply
    0
    • M Maximilien

      In Visual Studio (latest), C++ solution. I have a project like : project\app project\lib1 project\lib2 project\lib3 project\util

      app <-- lib1 <-- util
      <-- lib2
      <-- lib3

      lib1 is dependant on util and app is dependant on lib1. util needs to be build before lib1 and lib1 before app. In the project dependencies window, I select lib1 and then check the util dependency. I've also looked at the project references and my lib1 is setup correctly to reference the util library. When rebuilding lib1, I expected util to be build before. There must be something I'm missing. (obviously) Thanks.

      CI/CD = Continuous Impediment/Continuous Despair

      Greg UtasG Offline
      Greg UtasG Offline
      Greg Utas
      wrote on last edited by
      #2

      I assume you're using VS. I never had a problem with it once dependencies were set up correctly, although I migrated builds to CMake last year. The only thing I can think of is that if lib1 changed but not util, then the build can just start with lib1.

      Robust Services Core | Software Techniques for Lemmings | Articles
      The fox knows many things, but the hedgehog knows one big thing.

      <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
      <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

      M 1 Reply Last reply
      0
      • Greg UtasG Greg Utas

        I assume you're using VS. I never had a problem with it once dependencies were set up correctly, although I migrated builds to CMake last year. The only thing I can think of is that if lib1 changed but not util, then the build can just start with lib1.

        Robust Services Core | Software Techniques for Lemmings | Articles
        The fox knows many things, but the hedgehog knows one big thing.

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        Thanks, I'm in the process of physically moving libraries around (don't ask) and cleaning up the solution. When I rebuild from scratch, I just want to build the util library first so that all other libraries and eventually the app can build. I don't think I can change to cmake (that would require a revolution).

        CI/CD = Continuous Impediment/Continuous Despair

        Greg UtasG 1 Reply Last reply
        0
        • M Maximilien

          Thanks, I'm in the process of physically moving libraries around (don't ask) and cleaning up the solution. When I rebuild from scratch, I just want to build the util library first so that all other libraries and eventually the app can build. I don't think I can change to cmake (that would require a revolution).

          CI/CD = Continuous Impediment/Continuous Despair

          Greg UtasG Offline
          Greg UtasG Offline
          Greg Utas
          wrote on last edited by
          #4

          CMake is integrated with VS now. Migrating to it (about 20 libraries) wasn't anywhere near as hard as I anticipated, and builds are much faster under Ninja. If you're interested, here's[^] an overview.

          Robust Services Core | Software Techniques for Lemmings | Articles
          The fox knows many things, but the hedgehog knows one big thing.

          <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
          <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

          M 1 Reply Last reply
          0
          • Greg UtasG Greg Utas

            CMake is integrated with VS now. Migrating to it (about 20 libraries) wasn't anywhere near as hard as I anticipated, and builds are much faster under Ninja. If you're interested, here's[^] an overview.

            Robust Services Core | Software Techniques for Lemmings | Articles
            The fox knows many things, but the hedgehog knows one big thing.

            M Offline
            M Offline
            Maximilien
            wrote on last edited by
            #5

            I'm working in an antediluvian organisation. Eventually we'll do it. (or not) :sigh:

            CI/CD = Continuous Impediment/Continuous Despair

            Greg UtasG 1 Reply Last reply
            0
            • M Maximilien

              I'm working in an antediluvian organisation. Eventually we'll do it. (or not) :sigh:

              CI/CD = Continuous Impediment/Continuous Despair

              Greg UtasG Offline
              Greg UtasG Offline
              Greg Utas
              wrote on last edited by
              #6

              Every organization is antediluvian! :-D

              Robust Services Core | Software Techniques for Lemmings | Articles
              The fox knows many things, but the hedgehog knows one big thing.

              <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
              <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

              1 Reply Last reply
              0
              • M Maximilien

                In Visual Studio (latest), C++ solution. I have a project like : project\app project\lib1 project\lib2 project\lib3 project\util

                app <-- lib1 <-- util
                <-- lib2
                <-- lib3

                lib1 is dependant on util and app is dependant on lib1. util needs to be build before lib1 and lib1 before app. In the project dependencies window, I select lib1 and then check the util dependency. I've also looked at the project references and my lib1 is setup correctly to reference the util library. When rebuilding lib1, I expected util to be build before. There must be something I'm missing. (obviously) Thanks.

                CI/CD = Continuous Impediment/Continuous Despair

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #7

                Project dependencies can be changed by going to the Solution properties (right click on the solution explorer root of the tree)

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                J 1 Reply Last reply
                0
                • H honey the codewitch

                  Project dependencies can be changed by going to the Solution properties (right click on the solution explorer root of the tree)

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  J Offline
                  J Offline
                  jschell
                  wrote on last edited by
                  #8

                  When I read the OP I was also wondering if they were referring to what you said or perhaps they thought the compiler would just figure it out.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups