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 can I move my project from Linux to Windows?

How can I move my project from Linux to Windows?

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 7 Posters 7.1k 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.
  • aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by
    #3

    Hi @AlekseyB:

    First of all, I assume you use QMake for building your project? Then please show us your .pro file, as @beecksche already said.

    I move project folder on Windows (in C:\qt project), but:

    Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

    if I open the project as an existing- Qt Creator falls and closes

    Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

    Qt has to stay free or it will die.

    A 2 Replies Last reply
    4
    • beeckscheB beecksche

      Hi @AlekseyB,
      Could you post your .pro file?

      Maybe it is possible that you use modules that are not available for Windows, because of a different version or an unix-only module (e.g. X11Extras).

      Try to delete all the Makefiles, .o files, etc. from the Debian OS before opening the project on Windows.

      A Offline
      A Offline
      AlekseyB
      wrote on last edited by AlekseyB
      #4

      @beecksche said in How can I move my project from Linux to Windows?:

      Hi @AlekseyB,
      Could you post your .pro file?

      My pro -file:

      #-------------------------------------------------
      #
      # Project created by QtCreator 2017-10-11T16:01:21
      #
      #-------------------------------------------------
      
      QT       += core gui
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      TARGET = Reseaches
      TEMPLATE = app
      
      # The following define makes your compiler emit warnings if you use
      # any feature of Qt which has been marked as deprecated (the exact warnings
      # depend on your compiler). Please consult the documentation of the
      # deprecated API in order to know how to port your code away from it.
      DEFINES += QT_DEPRECATED_WARNINGS
      
      # You can also make your code fail to compile if you use deprecated APIs.
      # In order to do so, uncomment the following line.
      # You can also select to disable deprecated APIs only up to a certain version of Qt.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      SOURCES += \
              main.cpp \
              mainwindow.cpp \
          CreateFilesForPaper/Development.cpp \
          MyLib/File.cpp \
          MyLib/Memory.cpp \
          MyLib/String.cpp \
          MyLib/FileSystems.cpp \
          GlobalVariable/GlobalData.cpp \
          MyLib/Interaction.cpp \
          CreateFilesForPaper/DlgCreateFilesForPaper.cpp \
          GlobalVariable/EventFilter.cpp \
          test.cpp
      
      HEADERS += \
              mainwindow.h \
          Signals/iSignal.h \
          Signals/Macd.h \
          CreateFilesForPaper/Data.h \
          MyLib/Allocator.h \
          MyLib/iExecuteTasksForDirectory.h \
          MyLib/iTaskWithAttempt.h \
          MyLib/ShortType.h \
          MyLib/SmartArray.h \
          MyLib/ThreadSafeArray.h \
          CreateFilesForPaper/Interface.h \
          CreateFilesForPaper/Development.h \
          MyLib/Memory.h \
          MyLib/File.h \
          MyLib/String.h \
          MyLib/FileSystems.h \
          Strategy/FactoryStrategy.h \
          Strategy/Strategy.h \
          GlobalVariable/GlobalData.h \
          GlobalVariable/TaskManager.h \
          MyLib/Interaction.h \
          CreateFilesForPaper/DlgCreateFilesForPaper.h \
          MyLib/ConverterStringToStruct.h \
          GlobalVariable/EventFilter.h \
          GlobalVariable/Event.h \
          test.h
      
      FORMS += \
              mainwindow.ui \
          CreateFilesForPaper/DlgCreateFilesForPaper.ui
      
      STATECHARTS +=
      
      1 Reply Last reply
      0
      • beeckscheB beecksche

        Hi @AlekseyB,
        Could you post your .pro file?

        Maybe it is possible that you use modules that are not available for Windows, because of a different version or an unix-only module (e.g. X11Extras).

        Try to delete all the Makefiles, .o files, etc. from the Debian OS before opening the project on Windows.

        A Offline
        A Offline
        AlekseyB
        wrote on last edited by
        #5

        @beecksche said in How can I move my project from Linux to Windows?:

        Maybe it is possible that you use modules that are not available for Windows, because of a different version or an unix-only module (e.g. X11Extras).

        Try to delete all the Makefiles, .o files, etc. from the Debian OS before opening the project on Windows.

        I don't use any modules. I not found in the project folder "Makefiles, .o files, etc", only h, cpp, ui and pro- files.

        1 Reply Last reply
        0
        • aha_1980A aha_1980

          Hi @AlekseyB:

          First of all, I assume you use QMake for building your project? Then please show us your .pro file, as @beecksche already said.

          I move project folder on Windows (in C:\qt project), but:

          Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

          if I open the project as an existing- Qt Creator falls and closes

          Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

          A Offline
          A Offline
          AlekseyB
          wrote on last edited by
          #6

          @aha_1980 said in How can I move my project from Linux to Windows?:

          Hi @AlekseyB:

          First of all, I assume you use QMake for building your project?

          Yes. This is the parameters of the call to qmake:

          qmake /home/viktor/qt/Reseaches/Reseaches.pro -spec linux-icc-64 && /usr/bin/make qmake_all
          
          1 Reply Last reply
          0
          • aha_1980A aha_1980

            Hi @AlekseyB:

            First of all, I assume you use QMake for building your project? Then please show us your .pro file, as @beecksche already said.

            I move project folder on Windows (in C:\qt project), but:

            Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

            if I open the project as an existing- Qt Creator falls and closes

            Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

            A Offline
            A Offline
            AlekseyB
            wrote on last edited by
            #7

            @aha_1980 said in How can I move my project from Linux to Windows?:

            Hi @AlekseyB:

            I move project folder on Windows (in C:\qt project), but:

            Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

            I delete all spaces in the path (and nothing non-ASCII) : without results.

            Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

            I delete .pro.user file: without results.

            I replace all '/' on '\' simbols (because in Linux other separator of file- system): without results.

            jsulmJ JonBJ aha_1980A 3 Replies Last reply
            0
            • A AlekseyB

              @aha_1980 said in How can I move my project from Linux to Windows?:

              Hi @AlekseyB:

              I move project folder on Windows (in C:\qt project), but:

              Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

              I delete all spaces in the path (and nothing non-ASCII) : without results.

              Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

              I delete .pro.user file: without results.

              I replace all '/' on '\' simbols (because in Linux other separator of file- system): without results.

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

              @AlekseyB Your QtCreator crashes? Did you try to create a default project in QtCreator and build/run it? It should actually not crash.

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

              1 Reply Last reply
              0
              • A AlekseyB

                @aha_1980 said in How can I move my project from Linux to Windows?:

                Hi @AlekseyB:

                I move project folder on Windows (in C:\qt project), but:

                Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

                I delete all spaces in the path (and nothing non-ASCII) : without results.

                Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

                I delete .pro.user file: without results.

                I replace all '/' on '\' simbols (because in Linux other separator of file- system): without results.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #9

                @AlekseyB
                First, as @jsulm says, nothing should "crash". Make sure your Windows Qt is all that the same versions as Linux, and that you can set up a tiny "hello world" without problem.

                Yes. This is the parameters of the call to qmake:

                qmake /home/viktor/qt/Reseaches/Reseaches.pro -spec linux-icc-64 && /usr/bin/make qmake_all

                What do you do for Windows? -spec linux-icc-64 does not look right for Windows, does it?

                A 1 Reply Last reply
                0
                • A AlekseyB

                  @aha_1980 said in How can I move my project from Linux to Windows?:

                  Hi @AlekseyB:

                  I move project folder on Windows (in C:\qt project), but:

                  Please avoid folders with spaces and other non-ASCII chars in it. This will lead to all kind of problems you can imagine.

                  I delete all spaces in the path (and nothing non-ASCII) : without results.

                  Oops, that should work - it is the usual way to . In addition to what @beecksche suggests, please remove the .pro.user file also. It belongs to a specific Qt/QtCreator installation and cannot be shared.

                  I delete .pro.user file: without results.

                  I replace all '/' on '\' simbols (because in Linux other separator of file- system): without results.

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by aha_1980
                  #10

                  @AlekseyB

                  I replace all '/' on '' simbols (because in Linux other separator of file- system): without results.

                  This is not necessary and will lead to problems. Don't do that.

                  Otherwise your pro file looks good, I don't see anything that could lead to problems.

                  One last thing comes to mind: on Linux foo.c and Foo.c are two different files, on Windows they are not.

                  Qt has to stay free or it will die.

                  1 Reply Last reply
                  1
                  • K Offline
                    K Offline
                    kenchan
                    wrote on last edited by
                    #11

                    @AlekseyB Your question was "how can I move my project to Windows?"
                    The Answer is...

                    1. If you want to use the Microsoft tools install the latest version of Visual Studio which will work with the version of Qt you used for your Linux project. Then install the Qt package for that.
                      If you want to use the more Linux like tool set then download that together with the Qt package for windows that matches your Linux project.
                    2. Make yourself a folder for you project on your windows machine and copy your Linux source code and pro file only, you don't need the pro.user file.
                    3. Edit your pro file and add the stuff to make it work with the windows paths and libraries etc. You can use the conditional stuff in the pro file to separate the Linux stuff from the Windows stuff. See the Qt documentation for more on this.
                    4. Build your project.
                      There is nothing to it. I have my project building on Windows and Mac using the same sources and pro file, so you can do it too :-)

                    You will benefit from building some Qt example project on you Windows set up and look at how the pro file differs from the Linux one.

                    Good luck and enjoy.

                    1 Reply Last reply
                    2
                    • JonBJ JonB

                      @AlekseyB
                      First, as @jsulm says, nothing should "crash". Make sure your Windows Qt is all that the same versions as Linux, and that you can set up a tiny "hello world" without problem.

                      Yes. This is the parameters of the call to qmake:

                      qmake /home/viktor/qt/Reseaches/Reseaches.pro -spec linux-icc-64 && /usr/bin/make qmake_all

                      What do you do for Windows? -spec linux-icc-64 does not look right for Windows, does it?

                      A Offline
                      A Offline
                      AlekseyB
                      wrote on last edited by
                      #12

                      @JonB said in How can I move my project from Linux to Windows?:

                      What do you do for Windows? -spec linux-icc-64 does not look right for Windows, does it?

                      This line from Linux system. On Windows it lool like this:
                      qmake.exe C:\Project\Test\Test\Test.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug" && <no Make step found> qmake_all

                      I have created a simple project in the Windows and when compiling got the following error:

                      15:33:21: Could not determine which "make" command to run. Check the "make" step in the build configuration.
                      Error while building/deploying project Test (kit: Desktop Qt 5.10.0 MSVC2013 64bit)
                      When executing step "qmake"
                      
                      JonBJ 1 Reply Last reply
                      0
                      • A AlekseyB

                        @JonB said in How can I move my project from Linux to Windows?:

                        What do you do for Windows? -spec linux-icc-64 does not look right for Windows, does it?

                        This line from Linux system. On Windows it lool like this:
                        qmake.exe C:\Project\Test\Test\Test.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug" && <no Make step found> qmake_all

                        I have created a simple project in the Windows and when compiling got the following error:

                        15:33:21: Could not determine which "make" command to run. Check the "make" step in the build configuration.
                        Error while building/deploying project Test (kit: Desktop Qt 5.10.0 MSVC2013 64bit)
                        When executing step "qmake"
                        
                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #13

                        @AlekseyB
                        So I know nothing about this, but as the message states, what is it you have in the make step of the build configuration of the Desktop kit?

                        A 1 Reply Last reply
                        0
                        • JonBJ JonB

                          @AlekseyB
                          So I know nothing about this, but as the message states, what is it you have in the make step of the build configuration of the Desktop kit?

                          A Offline
                          A Offline
                          AlekseyB
                          wrote on last edited by AlekseyB
                          #14

                          @JonB said in How can I move my project from Linux to Windows?:

                          So I know nothing about this, but as the message states, what is it you have in the make step of the build configuration of the Desktop kit

                          I want to create an x64 application. But when I installing Qt Creator there is only x32 debugger MINGW.

                          1. Do I have to create x64 applications to install: qmake x64, x64 compiler and debugger x64 also?
                          2. Which of these three components determines x32/x64 received the application?
                          3. Can they have different x32/x64?
                          mrjjM 1 Reply Last reply
                          0
                          • A AlekseyB

                            @JonB said in How can I move my project from Linux to Windows?:

                            So I know nothing about this, but as the message states, what is it you have in the make step of the build configuration of the Desktop kit

                            I want to create an x64 application. But when I installing Qt Creator there is only x32 debugger MINGW.

                            1. Do I have to create x64 applications to install: qmake x64, x64 compiler and debugger x64 also?
                            2. Which of these three components determines x32/x64 received the application?
                            3. Can they have different x32/x64?
                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            @AlekseyB
                            Hi
                            Qt dont supply 64 mingw version for windows.
                            But its possible but takes quite some work
                            https://stackoverflow.com/questions/38335424/how-to-use-mingw-64-with-qt-creator

                            There is 64 for visual studio, so that might be an option. ?

                            1 Reply Last reply
                            1

                            • Login

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