i installed Qt Creator with Qt5.15 by Qt maintenance tool and i`m missing the debug dlls like QtCored.dll in my bin folder of mingw...what can i do?
Related
Are there any advantages for building a Gtk3 app for Windows OS with the MSVC Visual C++ Compiler over msys2 mingw (ucrt64)?
Functionality-wise? Look-wise? Debug-wise?, Deployment-wise?
I'm new in a project that builds Gtk2 apps for Windows with Visual C++. No one really remembers if there was a special reason for using Visual C++.
I was asked to create a build process for the Gtk3 version.
I came up with using Mingw (ucrt64) with msys2 which is one of the ways described on Gtk Windows page.
Packaging and Build:
I installed the necessary packages with msys2 and I'm able to build the app both with mingw and with Visual C++. With mingw I can use pkgconfig with cmake. With Visual C++ It's not so straight forward - I just give it hard-coded paths.
Debug:
When building with mingw I was able to also debug with gdb (also by using VS code). I haven't tried to debug the Visual C++ build yet.
Deployment:
After the Mingw build I created some shell script to copy dlls, icons, etc.. to a release dir and I can package this this and deliver it. Is there a better way with Visual C++?
Just downloaded Qt Creator and compiled my application.
I am using windeployqt on the command line since I did not find any option in Qt creator itself.
When I use it on my binary I still have to copy DLLs like libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll from my Qt installation directory C:\Qt\6.2.2\mingw_64\bin into my deployment directory or otherwise I cannot start the .exe file.
The same happens if I am trying to start it in my target build directory without the Qt Creator.
Shouldn't windeployqt or the Qt Creator copy those DLLs into the build and deployment directory, so you can run the .exe properly?!
Qt supports compiling all including qml without MSVC. So how to install qt creator and qt studio without them, how to create qt package that will not rely on MSVC at all?
You could build QtCreator with mingw and distribute it in your classroom : take a look at the Readme https://github.com/qt-creator/qt-creator
If you cannot install MSVC redistributable run times, you can either build your own package using MinGW (see other answers, but note that you only need to rebuild Qt Creator and Qt 3D Studio, not Qt intself).
Or you can install the official packages that do depends on MSVC runtimes (for QtCreator and Qt Studio) and instead of installing the MSVC Redistributable Package, you can copy paste the required DLLs to the installation folder (e.g C:\Qt\Tools\QtCreator\bin for Qt Creator).
For Qt Creator it seems that you will need:
MSVCP140.DLL
VCRUNTIME140.DLL
You can check the missing DLLs using Dependency Walker or similar tools.
Note that if copying the DLLs around is not recommended by Microsoft, but it does work. And it is less cumbersome that rebuilding Qt Creator.
It's also possible to directly install redistributable Visual C++ DLLs
in the application local folder, which is the folder that contains
your executable application file. For servicing reasons, we do not
recommend that you use this installation location.
https://learn.microsoft.com/en-us/cpp/ide/redistributing-visual-cpp-files
I have succesfully compiled a QT program for windows. I can not directly run the program in the build directory. The Dependency Walker shows that the paths to Qt5Gui.dll Qt5Widgets.dll Qt5Core.dll are not found. I am copying the dlls to the build directory and the program runs as expected. My question is how can I avoid copying the dlls in the build directory. Is there an option that I should add to the CMakeLists.txt to help in this situation ? I am using windows 10.
I want to make QtCreator able to compile with mingw and msvc but i don't know how.
I found some information over the internet but didn't work for me.
I tried by installing
QtSDK + qtvs2008 + qt visual studio addin [FAIL]
QtCreator standalone + mingw + qtvs2008 + qt visual studio addin [FAIL]
QtCreator compiled with visual studio + mingw + qtvs2008 [FAIL]
I don't know what else to try so i will need some help here.
Is this thing possible?
I have vs2008 installed. When I download the latest Qt version and create project in Qt Creator it automatically adds targets for mingw and msvc. In other words, when you install Qt SDK select "custom" install and check what components you are installing. Addons for vs2008 is included in the package.
Start with the Qt SDK. That gives you Qt Creator, the MinGW compiler, and a Qt version compiled with MinGW, and is suitable for developement with MinGW out-of-the-box. Then add a stand-alone version of Qt binaries build with MSVC, or get the sources and compile it yourself (configure.exe and nmake from a MSVC command prompt). In Creator you go to Tools->Options->Qt4 Version, and 'Add' the MSVC version by pointing the entry to the bin\qmake.exe in the MSVC version. Afterwards you should be able to switch between the MinGW and MSVC version in the Project tab. You don't need the Visual Studio AddIn.
While installing, choose custom type of installation. Selecte libraries for needed compilers in QtSDK->Development Tools->Desktop Qt->Qt-.
4/1/2016
I think maybe you need this qt online_installers. With this way, maybe you can make qt-mingw and qt-msvc work together.
Here are the configure screenshot: