Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT Compile problem.
Hi, i have a lot of problems with QT compilation process, version 5.3.2.
When i compile QT, at the end of compilation, there are few errors, but it said "Compilation terminated".
I use MinGw4.8 i think. When i run my program, and i add this line to config
Then if i compile my program, and check the folder, there are no additional files, and if i run the .exe, it gives me the error.
Need help, i lost one day, and i don't have patience to do it again.
I don know, if i should add that new build as a QT version, or i just add "shared" in config?
I set the -prefix /path but it still compiles it to the directory of source, and their is no qmake.exe, so i can't add it as my tool set.
Hi and welcome to the forums.
Unless you post the actual error it gives, its very hard to suggest anything :)
First, tell me if i should add that new compiled environment, or i just add "CONFIG+= shared " ?
Hi and welcome to devnet,
The -prefix option is used when you call
make install(or mingw32-make in your case). So before going further to that to have your custom version installed properly. Then with Qt Creator, add this new version, make a Kit for it and then you can use it to build your application.
If you are starting your application outside Qt Creator, you have to first follow the deployment procedure. The most simple thing to do is to use
@SGaist But their is no qmake.exe, so how can i add that ne version? I compiled it two times.
@UnLuckyGuy If there is no qmake.exe then your build failed or you did not execute "make install"
@jsulm I installed version 5.2, but in src, there is no Makefile, configure etc, there are just folder, and if i run the command prompt, then i do cd and configure, it says "Error, unknown command" or something like that.
How to generate those files? I n version 5.3.2 it's all there, but here not. I prefer 5.2, so now i must fix this issue too.
@UnLuckyGuy What exactly did you install? To build Qt you need its source code.
You don't generate configure, it is already there.
In version 5.3.2, there are config files, and some more, in 5.20 there are folders only :O
In 5.3.2 if i just do:
cd: path, and use this commands configure -platform win32-g++ -release -shared
It's run, in 5.20 is give's me the error "unknown commands" or incorrect.
I am downloading 5.2.1, i don't like that 5.3.2, i build my program, and my tool has bad performance (The project has been created in 5.20).
So, i should use prefix command, in mingw32-make?
For example : mingw32-make -prefix c:/softwares/qt...etc ?
Where did you download the 5.2 sources from ?
Just in case, you do realise that the current supported version is 5.10 with the LTS being 5.9 ? You are trying to use outdated versions of Qt which might not be the best bet in the long run.
@SGaist Men, it was something like 3-5 years ago... I don't know, other versions don't work with OpenGL in my case, so i use that. (It's not a openGl program, but i like this version). I remember, i donwnload it from here probably.
Sources are ther,in installation i check "sources", and it install it.
I am installing 5.2.1, will see, if they are there.
Nothing is there too, in version 5.2.1, only folders are there.
I am gonna download somthing like 5.6, or better, will see what happend.
You can grab the sources from here.
Why 5.6 ? Do you have a technical limitation that forbids the use of a current version ? As wrote before, if you need LTS the current is 5.9.
@SGaist This is all messed up... I download 5.7, and it's compile, but it fails too. It create the qmake, but if i trz to us is, it's impossible to run anything, error "QT5 dll is missing" and "widgets module is not declared".
I am not gonna download any rusty scrap again. I have enough.
You don't give any information about what option you are using so it's close to impossible to give you some hints.
By the way, why are you building Qt ?
@SGaist Men, listen, the only thing i do, is run the command prompt, set the path to the source, add:
configure -platform win32-g++ -release -shared
Then in mingw32-make if i try to use, that rusty junk doesn't work, i mean prefix:
And that's it, i do nothing else. When it's compiling, it ask me for opengl, but i can skip it, is not an error, but something like warning i think. I dont want ther OpenGL, at least now.
"By the way, why are you building Qt ?"
I wanna compile my tool, and send to my friend, with DLL's, not the source code.
I wanna compile my tool, and send to my friend, with DLL's, not the source code.
For that you do not have to compile Qt by yourself. Simply install precompiled Qt for your compiler and use it.
Diracsbracket last edited by Diracsbracket
Not related to your problem, but this forum has the neat option where you can make a screen shot and directly paste it in your post using CTRL-V (since you are working on Windows it seems). Or drag&Drop your image file directly into your post. That saves you the trouble of having to upload your image to some external site like
@jsulm If you help me, where to download the right Pre-compiled version, because i rly have enough of errors.
I have now QT 5.2.1 and 5.7 with MinGW 5.3 and 4.8, what version should i donwload of that pre-compiled QT? And where?
Guys, anybody knows what to do?? I need it, and i tried everything i can.
PS.Here is the error list.
What commands shold i use on mingw32-make ?? I tried t download that pre-compiled version, but i can't find it for QT.
Here is direct link to lastest version
you can go back to get older if you really need.
Make sure to select the mingw version as you not to have VS installed.
@mrjj But it's gonna compile? I need any working version to compile, and have the access to compile my tool. Even if it's 5.9, i just need it for compilation process.
But its precompiled ? ready to run.
As soon as its installed , its ready to compile Qt apps.
You do not need to build it manually.
@mrjj Hopeful it's gonna work.
Will see, any way if someone know's how to fix that issue (for future), i would like to know, because even if now it helps me a lot, in future i should be able to compile it by myself.
Fu** up, it's not working.............
There is no fu** QMAke again, man wtf?
Don't ask me how much time i lost... I find one tutorial, so i go to my compiler directory, and i copy all the dll's, i run my program, and i delete everything, and because the application is running, it stops just the needed DLL's, Works.....
I send it to my friend, and what happened??ERROR! Because he has win 10, i thought maybe if i install QT 5.6 and try there, it's gonna work. Another few hours lost, and nothing.
I had fu** enough, if someone asks me if he should use QT, i am gonna say "NO, become a farmer, killer, cannibal, whatever you like, but don't use QT, cuz its gonna ruin your life"
I am done with that.
@UnLuckyGuy It is always easy to complain about something else instead of asking yourself whether you should learn more. You clearly expect something which is doing what you want without you doing much. Reality is different.
There are many many developers out there using Qt successfully and you're not even able to download and install Qt...
Qt ruined your life? At least you're writing funny posts...
What do you mean there is no qmake again?
If you installed one of the binaries i linked too , that is not really possible.
Unless you have a virus scanner that eats it or get write errors during installation.
For running app on other system.
That is called deployment. Besides some DLL it needs, there is also one or more sub folders.
Often this tool can do most of the work of creating the deployment folder
I like this site for overview of the process:
(it actually starts with the error u got)
Its not related to Qt version. You will get same error for most version as they all use
same deployment structure.
@jsulm Men,i dot have fu** 20 years for that, and i am not gonna live 500-700 to watch people like you, and lose my time. If you don't respect my time, i am not gonna speak with you.
I tried everything i could, i watch more than one tutorial, i do the exact same thing, and i got errors, so think, what you are you talking about.
"There are many many developers out there using Qt successfully and you're not even able to download and install Qt..."
So how i create any project, if i can't install it? Go move you fingers, download version 5.2.1 or 5.2.0, and check by your self if there are those configuration files in source directory. You just talk, but you don't even check it.
@UnLuckyGuy I spent my time trying to help you and you say I'm not respecting your time?!
What do you mean with "people like you"? What do you know about me?
Well, I don't have to waste my time trying to help people who don't respect other people and are not able to communicate in a civilized way...
@jsulm You are comparing few days of pain, with fuc*** 15 min???????????????????????????????????????????????????????
What's wrong with you? It's like comparing an elephant or a dinosaur with ant....
Men,i dot have fu** 20 years for that, and i am not gonna live 500-700 to watch people like you, and lose my time. If you don't respect my time, i am not gonna speak with you.
@mrjj told you everything you need to know on how to deploy an application. If it takes you 20 years you should find a new hobby/career path. ;)
This is not a Qt thing this is every single compiled application. If you want easy deployment perhaps learn a simpler language like python or java? Both of those have their deployment woes as well but they aren't as bad as compiled languages.
So basically you just need to learn the basics of deployment of compiled binaries. It is different for every system with windows being one of the harder ones to deploy to.
Luckily for you, Qt being as awesome as it is, there is a tool called
windeployqtthat does it all for you.
Don't get mad at people for trying to help you though. We've all done our time learning how to be software engineers. You have to put in your time too. It can be frustrating but blaming a tool like Qt just shows how little experience you have. Qt is one of the easier things to deploy with. There is a term in computer science called dll hell (google it). It was around a long time before Qt and will continue to be around for a long time.
You are comparing few days of pain, with fuc*** 15 min??????????
We've all had the "few" days of pain. I had a bug caused by Microsoft that took me 30 days to find. So "few" days is nothing in this industry... @jsulm came in here to help. Nobody wasted your time but you most definitely wasted his. Apologies to him would be the proper thing to do. Just saying.