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. Compile Linux project in Windows

Compile Linux project in Windows

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.2k 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.
  • J Offline
    J Offline
    JohnDoeQtUser
    wrote on last edited by JohnDoeQtUser
    #1

    Hi, I have created a simple window with two buttons in Linux with Qt. Now I want to compile that window in Windows 10. I guess all I have to do is copy all files in the folder where my project file is from my Linux computer over to my Windows 10 computer and open that project file in Windows 10 and compile. Is that correct ?

    1 Reply Last reply
    0
    • ndt_mikeN Offline
      ndt_mikeN Offline
      ndt_mike
      wrote on last edited by
      #2

      You will probably need to make some changes to the .pro file, but essentially yeah that will be all it takes.

      Post your .pro file and people cna help you from there.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JohnDoeQtUser
        wrote on last edited by
        #3

        Thanks alot ndt_mike. I copied all the files to a folder in Windows 10 and I told Qt to open the .pro file but I got a message about the user file not being created on this computer and pointing to some folder locations so I figured it's a config file that told Linux where the various folders were so I told Qt to ignore that file and the project open without a hitch. I then compiled the code and the produced .exe file worked flawlessly. But after that when running the .exe outside Qt I had to manually add the required DLLs but I think this is normal for a Windows program.

        So problem solved I guess unless there is some easy way to had the DLLs automatically within the folder where the .exe is. Thank you !

        jsulmJ 1 Reply Last reply
        0
        • J JohnDoeQtUser

          Thanks alot ndt_mike. I copied all the files to a folder in Windows 10 and I told Qt to open the .pro file but I got a message about the user file not being created on this computer and pointing to some folder locations so I figured it's a config file that told Linux where the various folders were so I told Qt to ignore that file and the project open without a hitch. I then compiled the code and the produced .exe file worked flawlessly. But after that when running the .exe outside Qt I had to manually add the required DLLs but I think this is normal for a Windows program.

          So problem solved I guess unless there is some easy way to had the DLLs automatically within the folder where the .exe is. Thank you !

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JohnDoeQtUser You should not copy the *.pro.user files as they are specific for the computer on which they were created.

          To run your application outside of QtCreator (not outside of Qt, Qt is a framework, not an IDE) you need to deploy it. Use http://doc.qt.io/qt-5/windows-deployment.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JohnDoeQtUser
            wrote on last edited by
            #5

            Thanks jsulm, I found out about the pro.user file as I've said when I first opened the .pro file, I got a warning to the effect that it was created on another system, so I won't copy it anymore. Thanks for the link, I think I understand and will study that further.

            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