Solved How can I move my project from Linux to Windows?
-
@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
-
@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.
-
@AlekseyB Your QtCreator crashes? Did you try to create a default project in QtCreator and build/run it? It should actually not crash.
-
@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? -
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
andFoo.c
are two different files, on Windows they are not. -
@AlekseyB Your question was "how can I move my project to Windows?"
The Answer is...- 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. - 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.
- 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.
- 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.
- 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.
-
@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_allI 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"
-
@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? -
@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.
- Do I have to create x64 applications to install: qmake x64, x64 compiler and debugger x64 also?
- Which of these three components determines x32/x64 received the application?
- Can they have different x32/x64?
-
@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-creatorThere is 64 for visual studio, so that might be an option. ?