Solved sharing projects in qt
-
Hi,
So now i have some qt project with me. If i want to send this project (ideally i want to be like this. When someone opens this project, it need to build when), can i send directly the project? Can the other user will be able to run this project in his sytem if qtcreator is installed. I am using qmake so i think he needs qtcreator in his sytem.
I am asking this because. I tried to copy the same project to other folder and run the project using qt creator. Then few errors are coming out like
C:\Qt5.12\5.12.2\msvc2015_64\bin\qmake.exe -o Makefile ..\..\..\Downloads\Project_V2_0_0_0\Project_V2_0_0_0\Project_V2_0_0_0.pro -spec win32-msvc "CONFIG+=qtquickcompiler" C:\Qt5.12\Tools\QtCreator\bin\jom.exe -f Makefile.Release Error: dependent '..\..\..\Downloads\Project_V2_0_0_0\Project_V2_0_0_0\project.ui' does not exist.
I am confused in the error part the ui is there in the copied folder. But why it was searching in three folders above Downloads folder
I copied my existing project from documents folder to downloads folder and folder location is like thisC:\Users\aravmadd\Downloads\Projectr_V2_0_0_0\Project_V2_0_0_0 Inside this folder there is folder names with project_V2_0_0 -> which contains all source files and pro file and ui file and resources file another folder to contain eigen dependencies named dependencies another folder with config file.
I am not sure if question is so clear. Please let me know if you need any more information.
Many Thanks :-)
-
@aravmadd
You probably copied stuff that should not be shared. Try the following:on the other pc,
- Close QtCreator
- delete the
*pro.user
file - delete buildfolder (all moc_xxx files, *.o files etc, just delete the shadow build folder)
- delete any and all .qmake-stash files you can find (they are "hidden" files)
- open the project in QtCreator
- Select appropriate kit -> Build
See if that helps
-
@aravmadd QtCreator is not required, but Qt is. To share projects with other developers you should only share source code, no binaries. Ideally you would use a code versioning system like Git.
"I tried to copy the same project to other folder and run the project using qt creator" - what exactly did you copy?
-
@aravmadd
You probably copied stuff that should not be shared. Try the following:on the other pc,
- Close QtCreator
- delete the
*pro.user
file - delete buildfolder (all moc_xxx files, *.o files etc, just delete the shadow build folder)
- delete any and all .qmake-stash files you can find (they are "hidden" files)
- open the project in QtCreator
- Select appropriate kit -> Build
See if that helps
-
@jsulm . Actually i shared entire project which contains all the source codes except build folder.
For now what i have done is i also copied the same project to different folder in my pc then tried to run the same project from different folder. then the error is coming which is shown in question . I am not sure if this is the right way
-
@J-Hilk I i have done the same thing as you described. However i deleted pro.user file and build folder .
Thanks for the answer. There are some hidden files which i copied. So error is from that.