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. How to move a Qt-VS project to a new computer
QtWS25 Last Chance

How to move a Qt-VS project to a new computer

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 984 Views
  • 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.
  • Puppy BearP Offline
    Puppy BearP Offline
    Puppy Bear
    wrote on last edited by Puppy Bear
    #1

    Hi there
    I'm migrating a Qt project from another computer, however there's some error which doesn't have much information on the Internet.
    Simply copying them to a new computer doen't work, some of the path might not be same, that's some reason made it wrong.

    The env is Qt5.9, Vs2015, win8.1
    I'm getting the error MSB6006 cmd.exe exited with code 2.
    (There's not much error showing here, even though I believe it's a env problem)

    I have reason to believe moving qt-msvc project to a new computer is not just setting header path and qt version on qt vs tools, I must missing something that cause the program compile failed.

    The problem I'm facing now is forcing me to reinstall Qt on new compter same path with the old one, but that's not possible if I need to handle serval Qt project from different person.

    The question is: how am I able to move a qt-vs project to a new computer safely, with copying all the files,dlls,associated path to another new computer?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by mchinand
      #4

      Also, don't copy any auto-generated files between the two computers. This includes the <projectname>.pro.user file, any Makefiles, .vcxproj files, etc. Only copy your source (*.cpp and *.h) files and your project (.pro) file, any other original files (files that go into a resource, etc.), and version control files (e.g., git files).

      1 Reply Last reply
      3
      • M Offline
        M Offline
        mchinand
        wrote on last edited by
        #2

        Can you share your project (.pro) file and post all output from the compilation, not just the single error line?

        1 Reply Last reply
        0
        • JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #3

          If the other computer has the same Windows version, it should be ok. Otherwise, C++ version may be different. It is better to install Qt5.9(not copy) and rebuild your project. It does not cost you anything.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mchinand
            wrote on last edited by mchinand
            #4

            Also, don't copy any auto-generated files between the two computers. This includes the <projectname>.pro.user file, any Makefiles, .vcxproj files, etc. Only copy your source (*.cpp and *.h) files and your project (.pro) file, any other original files (files that go into a resource, etc.), and version control files (e.g., git files).

            1 Reply Last reply
            3
            • Puppy BearP Offline
              Puppy BearP Offline
              Puppy Bear
              wrote on last edited by
              #5

              Problem solved, need to set .user file's path with opening it.
              It contained last computer's qt path.

              Christian EhrlicherC 1 Reply Last reply
              0
              • Puppy BearP Puppy Bear

                Problem solved, need to set .user file's path with opening it.
                It contained last computer's qt path.

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @Puppy-Bear said in How to move a Qt-VS project to a new computer:

                Problem solved, need to set .user file's path with opening it.

                mchinand about 13 hours ago

                Also, don't copy any auto-generated files between the two computers. This includes the <projectname>.pro.user

                You must not copy the .user file as @mchinand already told you as it contains data (e.g. paths) specific to your configuration.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                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