How can I move my project from Linux to Windows?
-
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. -
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.
@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 +=
-
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.
@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.
-
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.@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
-
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.@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_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_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
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? -
@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.
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.
-
@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?@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"
-
@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?
-
@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. ?