I am developing a Qt application and would like to deploy web engine dll's with the application.
The application does not have dependencies to webengine nevertheless I want to deploy webengine dll's.
Snippet from Cmake:
find_package(Qt5 COMPONENTS Core Widgets Quick Qml WebEngine WebSockets)
# Deploy web engine dlls in release mode
if (CMAKE_BUILD_TYPE STREQUAL "Release")
install(
CODE
"execute_process(
COMMAND ${WINDEPLOYQT_EXECUTABLE} --verbose 0 --no-compiler-runtime
-webengine -websockets WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)"
)
message("Release build")
endif (CMAKE_BUILD_TYPE STREQUAL "Release")
Currently the above code does not produce any result. I do not want to provide binary to the execute process because the binary does not have any dependency.
Thank you
Related
Hello my problem is how to build qt application without need a msvcrt.dll
and builded a exe need msvcrt.dll how to fix? im trying build with /MT commandline argument but not working ineed make a full Standalone Qt application.
Thank you
The solution is to use ./configure -static -static-runtime for MSVC when building Qt. It will link the windows runtime libraries statically.
-static-runtime .... Statically link the C/C++ runtime library.
or you use MingW as your compiler. MingW will not have the typical windows runtime dependencies. There may be dependencies, but they are already available on every Windows system.
As far as I know -static-runtime is available somewhere from Qt 5.x
When i run my first project in QT creator 5.5.1 and then it appears this in Issue "Qt Creator needs a compiler set up to build. Configure a compiler in the kit options." and in output it appears "21:12:35: Configuration is faulty. Check the Issues view for details.
Error while building/deploying project Bunthai (kit: Desktop)
When executing step "Make" ".
You only installed Qt Creator, which is only an IDE, but does not contain any compiler or library.
Install the integrated suite instead : http://www.qt.io/download-open-source/
Under windows, it includes a preconfigured compiler (MinGW)
I want to build my program(developed with QT 5.0.2) and give it to some friends.
How can I process?
I tried qmake -project and qmake in my folder with the *.cpp files, but it didn't create any exe.
This is my .pro file
#-------------------------------------------------
#
# Project created by QtCreator 2013-08-03T18:53:41
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = target
TEMPLATE = app
SOURCES += main.cpp\
class1.cpp\
class2.cpp\
class3.cpp\
class4.cpp
HEADERS += class1.h\
class2.h\
class3.h\
class4.h
FORMS += class1.ui\
class3.ui
Have you compiled your QtSDK statically? if yes, you can build your project as static linking, either you can't, if your are manually download your Qt repository from qt-project.org, it is a shared version of Qt, you should remove the line contain CONFIG += static and compile your project as shared and add the line below to your .pro file:
QT += core gui
Note:
Use Qt Creator as Qt Framework IDE to manage and build your projects, it's really handy and great tool, another way is use Visual Studio Add-In that integrates with VStudio, if you are professional in Qt architecture, you can use makefile base building of Qt withqmake.
Tutorial for building project on Windows
I am new to QT. I have just installed Qt 4.7.4 (32 bit) which uses mingw compiler. I have few questions.
Please try to answer these :--
I have created a gui application in QT creator. With build configuration For each QT version one debug & one release now it created a build folder geny-build-desktop-Qt_4_8_1_for_Desktop_-MinGW_Qt_SDK__Debug
Inside this folder three makefiles are there :---
Makefile
Makefile.Debug
Makefile.Release
Inside this folder two folder are there :---
debug ---> contains compiled .exe file
release ---> empty
Q-1> How can I change settings in QT creator to compile my project for the release build ?
On the left toolbar of Qt Creator you will find the button to set the build for your project, set it to release.
With your settings a folder named geny-build-desktop-Qt_4_8_1_for_Desktop_-MinGW_Qt_SDK__Release will be created with a release subfolder in it, containing your compiled binary.
Anyway, it doesn't have to do with static build, it is simply a release build of your binary, still depending on Qt dynamic libraries. The difference is that the debug build is linked to the debug libraries (for example: Qt5Cored.dll), while the release build is linked to the release libraries (for example: Qt5Core.dll).
Release builds are usually optimized and don't include debug symbols, so they are also smaller.
If you think about static linking Qt to your program (i.e. getting a binary which not depends on Qt dynamic libraries) you should be aware that you should get a commercial license.
Try using the CTRL + T combination.
I am building my Qt project in Xcode 4.2, using an external build system project (building with 'make'). I have the build system ready and I can build applications, but I can't import Qt code from the code editor. So how do I link against the QtGui.framework and the QtCore.framework in Xcode 4.2 using 'External build system' project settings?
Read the documentation on qmake.
From the pro file you can create a xcode project.
Developers on Mac OS X can take advantage of qmake's support for Xcode project files, as described in Qt is Mac OS X Native, by running qmake to generate an Xcode project from an existing qmake project files. For example:
qmake -spec macx-xcode project.pro
Spend some time in understanding qmake, it will help you a lot.