Very useful tutorial even 2 years later. For anyone installing to windows, like I am, for the configure commands, instead of "./configure" do "configure.bat" and instead of make, use cmake. So it would be "cmake --build ." and "cmake --install ."
Thanks for this tutorial. I done this. Now i'm going to test working with openssl QtPositioning and QtLocation, which is not working with just installed variant to me.
When you select Qt 6.6, you don't need to select Source.. and can even add additional libraries (ex. QSerialPort).. but if you choose 5.15.2 then there's no additional libraries, and you MUST download and build from source? I've seen prebuilt 5.15 binaries (Frank Su), but wouldn't you still need to run some sort of installer to get the registry and dlls copied to windows? And once you have both installed, you would run Qt Creator 6.6 or 5.15? i.e. you wouldn't have one Qt Creator that can point to the Qt version you want to build for?
Hello. When you add the options target_link_options (test01 PRIVATE --static -static-libgcc -static-libstdc ++) in the project's CMakeList.txt I always get an error in the linker. error: attempt to static link the dynamic object `/usr/lib/x86_64-linux-gnu/librt.so ' Does anyone know what is happening ?. I tried everything with cmake. But I have a suspicion that QT does not support full static linking. PD: I remove the find_package and another stuff from QT6 from the CMakeList.txt. And The code from Qt from main.cpp and work. Generate a full static linked binary with no issues.
I found the solution -DLIBRT:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.a In qt creator: drive.google.com/file/d/1OdXB5Py6P8iO5eCw92-RIu5tkCnGAaTk/view?usp=sharing drive.google.com/file/d/1tpzhUQQmR8TgyU10gh22q4e4UH4G519Q/view?usp=sharing drive.google.com/file/d/19Pou3fC5_yjhrriC9AdkQMScrRFzRJfz/view?usp=sharing //
I have a dream that one day. Software like this on Linux will just work without spending hours trying to troubleshoot it with compile / build errors. Especially Qt and compile from sources. Had nightmares with doing that. Adding MQTT and MySQL support in it while building from sources for cross compile Raspberry Pi deployment. Horrible experience in the past with days wasted. Not a fan.
I guess Im asking randomly but does any of you know of a trick to log back into an Instagram account?? I somehow forgot my password. I love any help you can give me!
@Kyle Jayden thanks so much for your reply. I found the site through google and im trying it out atm. Looks like it's gonna take quite some time so I will get back to you later with my results.
@VoidRealms Evergreen: "LTS Ubuntu vs non-LTS Qt". Note that Debian works "ahead" Ubuntu/Mint and usually you will have better luck with Debian10. As a development setup though I would not recommend Ubuntu LTS. Rather use a VM with Ubuntu 20.10 (better a rolling-release distro).
Online installer for Qt 6 currently not working for last 24 hours-ish for me, according the Qt blog there was a cloud disk issue, so here I am building it myself, or trying to...
Much of this depends on how you compile it - Even a static build will still link to external system libraries. Basically a static build (if done correctly) will take the code the application uses and links it directly into the binary. if you want a app with zero dependancies you need to look to 3rd part tools (and even then most will still have system lib dependancies)
Very interesting tutorial. I have a Debian 11, I have installed Qt 5.15.2 and the IDE Qt Creator and Qt Designer based on this library version (Qt 5.15.2). I tried to create a custom widget or plugin for Qt Designer using the wizard provided by Qt, but when I compile it, it gives me an error about QT += uiplugin. I also tried to replace it with QT += designer but it doesn't change anything. I do not know what to do. Could you help me ?
I compiled Qt 5.12.6 static and qwt by this build. When i try run my program ( Qt and qwt ) the program crushing and stop. Anyyone know how to link qwt in static build?
@@physicssimulator2656 unlike x86 processors, arm processor vary in both performance and instruction set capabilities, so supporting them all is a little bit harder
Thanks for this job, it's very useful! (Already in bookmarks) Do you know if there is any source with full QML-related changes list? I totally can't understand where QML TreeView was moved to? Should we rewrite code to use TableView instead of TreeView in Qt6? Quite confusing.
Good and thanks for your useful information but for my pc i have to download some packages like activeperl , cmake, python and ninja and then add them to PATH(my os is windows)
after linking the static QT to Qt Creator i import my project and when i am trying to run it i am getting below error... qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Could you please help me how to resolve this issue.
Nicee!! I was just wondering if i should switch to linux or not.. but it seems that windows does a better job in installing Qt.. i still don't understand linux... i am just a guy who wants to learn and write c++ and qt code, should i switch to linux ? will it worth be it ?
Very useful tutorial even 2 years later. For anyone installing to windows, like I am, for the configure commands, instead of "./configure" do "configure.bat" and instead of make, use cmake. So it would be "cmake --build ." and "cmake --install ."
what should be in this .bat-file? there is no configure.exe file in the derictory
@@rottennature7492 the configure.bat file comes with qt sources
Thank you, after watching this video, the problem that was bothering him for a whole day was solved
lol, 1:47, the exact moment i drinked my coffee
Thanks for this tutorial. I done this. Now i'm going to test working with openssl QtPositioning and QtLocation, which is not working with just installed variant to me.
New micro? You sound much better :)
I upgraded to a blue yeti
When you select Qt 6.6, you don't need to select Source.. and can even add additional libraries (ex. QSerialPort).. but if you choose 5.15.2 then there's no additional libraries, and you MUST download and build from source?
I've seen prebuilt 5.15 binaries (Frank Su), but wouldn't you still need to run some sort of installer to get the registry and dlls copied to windows?
And once you have both installed, you would run Qt Creator 6.6 or 5.15? i.e. you wouldn't have one Qt Creator that can point to the Qt version you want to build for?
Hello.
When you add the options
target_link_options (test01 PRIVATE --static -static-libgcc -static-libstdc ++)
in the project's CMakeList.txt I always get an error in the linker.
error: attempt to static link the dynamic object `/usr/lib/x86_64-linux-gnu/librt.so '
Does anyone know what is happening ?.
I tried everything with cmake. But I have a suspicion that QT does not support full static linking.
PD: I remove the find_package and another stuff from QT6 from the CMakeList.txt. And The code from Qt from main.cpp and work. Generate a full static linked binary with no issues.
I found the solution
-DLIBRT:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.a
In qt creator:
drive.google.com/file/d/1OdXB5Py6P8iO5eCw92-RIu5tkCnGAaTk/view?usp=sharing
drive.google.com/file/d/1tpzhUQQmR8TgyU10gh22q4e4UH4G519Q/view?usp=sharing
drive.google.com/file/d/19Pou3fC5_yjhrriC9AdkQMScrRFzRJfz/view?usp=sharing //
Other solution is change the CMakeLists.txt to
set(LIBRT "/usr/lib/x86_64-linux-gnu/librt.a") #
I have a dream that one day. Software like this on Linux will just work without spending hours trying to troubleshoot it with compile / build errors. Especially Qt and compile from sources. Had nightmares with doing that. Adding MQTT and MySQL support in it while building from sources for cross compile Raspberry Pi deployment. Horrible experience in the past with days wasted. Not a fan.
I guess Im asking randomly but does any of you know of a trick to log back into an Instagram account??
I somehow forgot my password. I love any help you can give me!
@Torin Cody Instablaster =)
@Kyle Jayden thanks so much for your reply. I found the site through google and im trying it out atm.
Looks like it's gonna take quite some time so I will get back to you later with my results.
@Kyle Jayden It did the trick and I actually got access to my account again. I am so happy!
Thank you so much, you saved my account !
@Torin Cody Happy to help xD
so when configuring for a static build the "-static-runtime" switch isn't needed anymore?
What does -release really mean though? Will I not be able to debug the Qt code if I use this option?
@VoidRealms Evergreen: "LTS Ubuntu vs non-LTS Qt". Note that Debian works "ahead" Ubuntu/Mint and usually you will have better luck with Debian10. As a development setup though I would not recommend Ubuntu LTS. Rather use a VM with Ubuntu 20.10 (better a rolling-release distro).
Online installer for Qt 6 currently not working for last 24 hours-ish for me, according the Qt blog there was a cloud disk issue, so here I am building it myself, or trying to...
I've had a lot of people come to me about that and I do sincerely hope that QT rethinks the whole online installer thing
Hi Thank alot but after building static i am not able to make it.
make -j8
make: *** No targets specified and no makefile found. Stop.
Thanks for the explanation, but the build part is not working on windows because make command is not recognized as command
Hi, thanks for the video. Is there anyway to build certain (specific) submodule (QtWebEngine)?
Hi bryan
How to remove left overs from previous build i'm using qt 5.12.10 ?
Very interesting video. How about building static Qt in Windows ?
When you ran $ ldd ./untitled there was a list of dynamic libraries getting loaded, I thought it was suppose to be linked completely statically?
Much of this depends on how you compile it - Even a static build will still link to external system libraries. Basically a static build (if done correctly) will take the code the application uses and links it directly into the binary. if you want a app with zero dependancies you need to look to 3rd part tools (and even then most will still have system lib dependancies)
Very interesting tutorial. I have a Debian 11, I have installed Qt 5.15.2 and the IDE Qt Creator and Qt Designer based on this library version (Qt 5.15.2). I tried to create a custom widget or plugin for Qt Designer using the wizard provided by Qt, but when I compile it, it gives me an error about QT += uiplugin. I also tried to replace it with QT += designer but it doesn't change anything. I do not know what to do. Could you help me ?
Hi, thanks for your tutorial, will all the tools be installed now?
If not, how to install?
I compiled Qt 5.12.6 static and qwt by this build. When i try run my program ( Qt and qwt ) the program crushing and stop. Anyyone know how to link qwt in static build?
Awesome! Thanks for the video!
Are you going to make at least a small video with the update of QT creator?
I planned on it :)
On an ARM (like with Ubuntu on Raspberry Pi) you don't have the Maintenance Tool as there's no installer for this architecture.
in that case usually we do cross-compiling just like making program for arduino and co.
@@fltfathin Why isn’t there just an arm binary for qt already ? (Genuinely curiosity)
@@physicssimulator2656 unlike x86 processors, arm processor vary in both performance and instruction set capabilities, so supporting them all is a little bit harder
Thanks for this job, it's very useful! (Already in bookmarks)
Do you know if there is any source with full QML-related changes list?
I totally can't understand where QML TreeView was moved to? Should we rewrite code to use TableView instead of TreeView in Qt6? Quite confusing.
Sadly I have not gotten that far yet
You are The Best!
you great we facing this issue frequently
Congratulations for your work. Do you think about making a video for Windows too?
thank from Brazil.
I tried to avoid working on Windows as much as possible but the steps should be pretty identical
Good and thanks for your useful information but for my pc i have to download some packages like activeperl , cmake, python and ninja and then add them to PATH(my os is windows)
You were compiling for MSVC for MinGW? If minGW, is it still necessary to download those packages? I keep running into errors.
@@HamzanMartinez Do not think that I could, I think it is not possible to build QT from source
@@martinm.jefferson7795 Heck even on 5.15.2 I can't compile it for static. Christ, this would probably need a compile from a linux OS.
@@HamzanMartinez also I can't do it with 5.12.0 and 6.0.2
@@martinm.jefferson7795 I'm setting up a VM with ubuntu 21, I'm going to try to cross compile it. I'll let you know if it works.
after linking the static QT to Qt Creator i import my project and when i am trying to run it i am getting below error...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Could you please help me how to resolve this issue.
Nicee!! I was just wondering if i should switch to linux or not.. but it seems that windows does a better job in installing Qt.. i still don't understand linux... i am just a guy who wants to learn and write c++ and qt code, should i switch to linux ? will it worth be it ?
Linux gives you more control over the OS so it's a bit easier to develop on. Once you wrap your head around Linux
@@VoidRealms oh i see... Thanks for replying !! I will definitely give it a shot.
@@xcaliber6027 if you need help a bunch of us are in the voidrealms Facebook group
@@VoidRealms oh.. that's cool!! i am joining right now!
thx u bro
Too many qmake, cmake and gmake errors all over. I think I will wait for the .run files like the version 5.* had.
I ended up making custom cmake files for qt6
You speak too much quick for a extra USA person 😪