How do I rename a Qt Visual studio project? - c++

I want to rename my Qt Visual studio project. I tried renaming the project folder and the vcxproj files. I replaced all the instances of the old project name inside the vcxproj files manually. I also replaced all the instances of the old project name inside the qrc files. I have done this before with other non-Qt visual studio projects, and it has worked successfully. However, with this project I am getting the following error.
MSB4181: the "QtRunWork" task returned false but did not log an error. (qt_globals.target 293)
Can someone please tell me how to fix this?

Related

Visual Studio 2019 Freeglut (via nuget) - cannot open "Freeglut.lib"

I've been trying to create a GLUT-compatible Visual Studio 2019 project. Manually installing has caused some extremely complicated issues and breaks the project completely (even after uninstalling it) so I'm just trying to use the Nuget package. The .h files seem to be included correctly after this. However, any use of the line '#include <GL/freeglut.h>' - even in a completely blank project - produces an LNK1104 error:
cannot open file 'freeglut.lib'
Are there additional installation steps I'm missing? The .lib file is present in the folders. Trying to manually link it in project properties changes nothing.
Resolved by using this method and then adding the line
#include <windows.h>

make visual studio add all necessary when building release

So I am working on an example project that displays video from a network stream.
The project is in C++.
After building the project in release, and trying to run the project on a different computer, I get errors on missing DLL files.
These DLL files are located within the installation location of Visual studio.
one example is msvcp140d.dll.
After copying all the missing files, I get a generic error with no specific file.
So:
Is there a way to tell visual studio to add all relevant files when building the project?

no configurations in cmake project with visual studio

When I add a new header or cpp file in the current cmake project, it shows up as no configurations in visual studio and the include (path I added in cmakelist) does not work properly.
If I create a new cmake cache after including it in main, then it is displayed in the project. However, when I delete the include sentence, the phrase no configurations appears again. How do I solve this?

Qt C++ Application deployment problems, used Visual Studio 2019 to create it

I just Build my Project and now when i click the executable file (.exe), i gives errors that some .dll files are missing, so i referred this page https://doc.qt.io/qt-5/windows-deployment.html which says that i can use Windows Deployment Tool, which is found in QTDIR/bin/windeployqt folder directory, but when i go to the path in the image c\Qt\5.14.1
i see that i have all these folders and all of them have bin folders, so to solve this i i went into visual studio , Extensions->QT VS Tools-> Qt options and this thing shows up ,where i got to know the version i am using
so, i opened command prompt and did this
After that, in my applications .exe folder, i see some more .dll files being added, but still i get the same errors
missing Qt5Widgets.dll,Qt5Core.dll,Qt5Gui.dll, i have all of those but the name ends with d, should i try renaming them ?
I have solved this by placing qt.conf file in my application's .exe folder
[Paths]
Prefix=C:\Qt\5.14.1\msvc2017_64
Defining Prefix in your qt.conf file allows it to find the qwindows.dll platform plugin when your app starts.

How to save default startup project in visual studio

What information does visual studio look at when determining the start-up project?
I have a C++ visual studio solution with 2 projects. My source control is messed up so I have to copy my solution folder from the repository to my local disk. When I do this and I run my application, the wrong project is set as the start-up project. In the repository I check in the .sln and .vcproj file as well as the cpp/h files, but not the .suo or .user files.
Visual Studio: Where does it store "Set as startup project"?
The startup project is stored in the .suo. As mentioned in that SO post, you should not check these in, because they are not portable across machines/directories.