Unsolved Hello World Doesn't Work
-
hi
sounds a bit strange.
Any chance you have Avast or any such scanner running ?
Sometimes it can block the newly create .exeAlso, to be able to click the .exe in the build folder, you need to have
the correct dlls copied there.
please see here
http://www.tripleboot.org/?p=138if a simple test program that 100% surely cant crash from code says
"The program has unexpectedly finished." then i guess something is up with your
visual c++ installation or the integration.If u are in a hurry to get working , then maybe try the mingw compiler ?
(other download)
That had worked for me out of the box in all cases. -
I attempted to reinstall Visual Studio, but the installer said something had corrupted my VS install. The install said it couldn't repair it and suggested a reboot as admin. After the 3rd time rebooting as admin with this same message, I decided to uninstall Visual Studio. Then I tried to install VS from scratch, but it said it was already installed. I suspect Qt damaged some obscure VS file or registry entry blocking a complete uninstall based on how it was acting. I ended up reformatting my drive. That fixed that problem.
An installation and getting started guide that includes a Hello Qt example to ensure a proper install seems obvious, but is either missing or very well hidden.
I'll try to install Qt again, but when my boss gets back from a trade show this week, this better be working or Qt is gone. I may gone too. Seriously, anyone in need of a C++ or Android programmer?
Hint to anyone else installing Qt. Install, then reboot your computer after playing with it for a bit. Try to use Qt again after the reboot. And back up your hard drive before the install.
-
Hi,
Qt's installation process doesn't modify anything related to Visual Studio (most new comers even install Qt for MSVC without having VS installed in the first place).
Also, check the automatic Windows update that have been installed. Sometimes they can wreak havoc on your dev setup.
-
@SGaist IMHO, regardless of what caused the problem, Qt needs to have an Install and First Steps guide. I spent days thinking I was using the product incorrectly with no way to know the difference between what should work and what I was seeing. New users have no guidance as to what they should be seeing, so not having a step-by-step guide and having it clearly available to new users is a serious problem with Qt and not VS. The error messages were terrible on top of that, in no way directing to a problem with VS. Inexcusable on Qt's part even if this was (and I doubt it) 100% a VS problem.
If you know anyone at Qt, tell them to not make excuses for poor error messages and no find-able and definitive newbie guide. They have dropped the ball.
"(most new comers even install Qt for MSVC without having VS installed in the first place)" How do you know what "most" developers do? Do you work for Qt? Do they gather and publish those statistics? Regardless, being able to install without VS doesn't imply the install doesn't touch VS. It could easily touch it if and only if it is installed.
Again, if anyone is reading this: "If you have VS installed, BACK UP BEFORE INSTALLING QT!!!!"
-
Hi, please don't blame Qt for the problems you have on your computer, as @SGaist says, Qt's installation process never modifies any Visual Studio stuff, I'm sure of it.
When starting with Qt I would also do as @mrjj suggests above, i.e. installing the mingw compiler, debugging always works for me using that toolchain. And about those CDB unexpected exits, it could be a mixup of the 32-bit and 64-bit flavors of CDB. I'd recommend testing Qt targeting 32-bit MSVC2013 programs first.
-
IMHO, you cannot say that just because your installation didn't just work ,
that it is a general problem. Many hundred thousands of people have installed
Qt with VS and have it just work out of the box with no issues whatsoever.
Your case is not normal at all.But I do agree. Before U install VS. backup as it will install tons of registry keys and have
many knowns issues with its installer. This is not related to to Qt. -
The guide you are talking about is in the documentation under Getting started guides.
The error message you are seeing comes from the Microsoft Tools not Qt Creator. CDB failed, if it doesn't return any particular information, you can't expect a developer to come up with something more meaningful. The same if the compiler throws an error, you'll get that error as is in the compiler console but it's not Qt Creator's role to interpret anything. Any other IDE will do the same, it will show you what the underlying tools have to tell, like creating a list of warnings/error and allow you to go at the right place in the sources to do the necessary corrections however it won't re-interpret the messages from the compiler even if some of them are unclear.
I know that from my experience on this forum, the missing VS installed case as come many times already. No I don't work for the Qt Company.
-
@hskoglund Poor error messages are Qt's fault. Lack of a detailed set of steps to create an "Hello world" app is also a Qt problem. I say this is a problem with Qt. Who would you expect to fix this if not Qt?
-
@SGaist said:
I know that from my experience on this forum, the missing VS installed case as come many times already. No I don't work for the Qt Company.
The word "most" means the numerator is larger than half the denominator. Since you have no data on how many installs are made and how many are done with VS missing, you are using the term "most" incorrectly. You need data from both the numerator and denominator to make that claim.
-
@SGaist said:
The guide you are talking about is in the documentation under Getting started guides.
I don't see a minimal Hello World app to confirm the installation at the link you posted.
-
@TigerBunny said:
Getting started guides.
Hi this one
http://doc.qt.io/qt-5/gettingstartedqt.html
works good for first app. for pure compiler test, then
any of the many buildin samples can be used. -
@TigerBunny said:
Poor error messages are Qt's fault. Lack of a detailed set of steps to create an "Hello world" app is also a Qt problem. I say this is a problem with Qt. Who would you expect to fix this if not Qt?
Misunderstanding how build chains work is a poor reason to pour your frustrations onto people who are trying to help you.
Your original error:
Dialog Title: Unexpected CDB Exit
Dialog Text: The CDB process terminated.Just means that CDB (that is the Microsoft console debugger) didn't respond to Qt Creator when interrogated and ultimately crashed. Unless Digia (the current owner of Qt) obtains Microsoft, you can take your pain with them.
By the way, even though I threw away windows as a viable development environment a long time ago, I still need to compile and test on it from time to time. And although
cl
(that is the MS compiler, there's nothing Qt-ish about it either) generates pretty crappy assembly andcdb
is slow as a mortally wounded snail, they still pretty much work. -
So in your opinion, the message:
Dialog Title: Unexpected CDB Exit
Dialog Text: The CDB process terminated.Is clear? Seriously???
No mention of what file they invoked. Where it is located. Why it was invoked. NOTHING! Let me be clear in case you missed it.
THAT WAS THE ENTIRE MESSAGE FOR "HELLO WORLD"
Do you get that? You are claiming they called something but knew nothing more that what they called. Not where, not why, if it loaded but failed, wasn't found... etc...
I know why CDB failed and the programmer knew too and didn't bother to say the error code returned by the OS. There was one, and they threw it away. They were too lazy to report the message from the OS. Can you tell me what was wrong from that message? I bet not.
I repeat my question. "WHO WOULD YOU EXPECT TO FIX THIS IF NOT QT?"
I never blamed anyone on this board for a message written by Qt. I blame Qt. Don't defend them for their mistake. If you work for Qt, then go fix it. If not, defending poor error messages will not make them better.
My frustration is with developers that think poor error messages are okay. That includes you.
-
@TigerBunny Instead of writing such unfriendly and offending posts in this forum you could file a bug report if you think there is something Qt developers should fix. This is how open source works. You get something for free, nobody forces you to use it. Then you have a problem and ask in this forum. People here are not paid to help you - they do it for free. More respect from your side would be appropriate.
-
@kshegunov said:
Misunderstanding how build chains work is a poor reason to pour your frustrations onto people who are trying to help you.
"Misunderstanding how build chains work is a poor reason to pour your frustrations onto people who are trying to help you."
The purpose of learning "Hello world" is to learn build chains. This guy is an jackass for trying to put the flaw back on me for not understanding something. That's bullshit. This is Qt's problem and programmers that accept this sort of poor software need to learn a lesson to not blame the user for poorly written software.
So people can write offensive statements to me and I should just take it? NO, I won't do that. If you give me shit, expect it back.
Yes, I am forced to use this. If I could dump this horrible product I would in a heartbeat. Yes, I am paying for this. No it's not free. There's the licensing fee and more so, my time. So, somehow you have "open source" confused with "free". I work for a living and I'm not sitting in my parent's basement playing with a toy. I have to use what my company tells me to use.
Let me be clear here. Even if this was 100% "Free" in every way, that would in no way mitigate the problem. The problem still exists, regardless of the cost. Your price argument is a red-herring.
The message didn't have the location, an OS error code,.. all things they could have reported but didn't. That's not a bug, it's poorly written software. Putting the blame on me for not understanding the "tool chain" for a "Hello world" is the kind of shit no one should dish out. It's insulting and blames the victim causing all sorts of damage.
Consider what someone considering getting into programming ran into a message like that and after trying to figure it out was told it is their fault for not understanding the build chain. That's a jackass move. kshegunov should feel ashamed of what they wrote.
Am I pissed off.... Sure. I get pissed off when people get abusive to others and act like they are "Only trying to help" when what they are really doing is stroking their own ego to feel superior. Here's some advice to people that want to dish out abuse and claim they are helping, keep your "help" to yourself.
-
@TigerBunny said:
No mention of what file they invoked.
If by "they" you mean
cdb
, then your application is executed throughcdb
. The console debugger is a program and Qt Creator spawns a process for it with the appropriate arguments. So the program you're debugging will run "inside" the debugger (the debugger process is a wrapper process for your program's process).Where it is located
Your program is located in the respective build directory, as per the project configuration in Qt Creator. It might be in the source tree, or outside it depending on the shadow build checkbox. In any case the configuration screen holds the build directory. The debugger is located where you'd installed the MS debugging tools.
Why it was invoked.
Because
cdb
is the debugger and you started the program in debug mode. Qt Creator starts the debugger process and tries to communicate with the spun process. If the debugger process however just exits or crashes (unexpectedly), then you get "Unexpected CDB Exit".I know why CDB failed and the programmer knew too and didn't bother to say the error code returned by the OS.
The debugger is separate from the OS and will not have an OS error code. It might have its own return code, but that would be referenced in the debugger documentation. Also if it crashed the return code will not be meaningful, but in any case it shouldn't just quit without saying goodbye to the IDE (hence the unexpectedness reported by Qt Creator).
Can you tell me what was wrong from that message?
Only that your debugger exited unexpectedly and didn't respond to interrogation, just as the message says.
"WHO WOULD YOU EXPECT TO FIX THIS IF NOT QT?"
I would first look for a reason why the debugger didn't run properly, before actually putting blame on a library (what Qt is) or even the IDE (Qt Creator). The toolchain configuration is a good place to start.
I never blamed anyone on this board for a message written by Qt.
And I didn't actually write that you did. I said that you pour your frustration onto people who are trying to provide assistance (like @SGaist and @hskoglund) by giving relevant links to the documentation and further explanation on why the IDE doesn't report text error(s).
Don't defend them for their mistake.
"Their mistake" is a matter of some debate, but in any case it's not my place to defend them - they can defend themselves if you contact them through the official channels. I have no connection to the developers, or the Qt company.
If you work for Qt, then go fix it.
I don't, but even if I did you won't get much empathy with that exact tone, or with passive-aggressive statements like: "If you know anyone at Qt, tell them to not make excuses for poor error messages and no find-able and definitive newbie guide. They have dropped the ball."
If not, defending poor error messages will not make them better.
That's the reason I report bugs when I encounter them. I don't go about on the forums rabidly shouting it's Qt's fault my dev setup doesn't work.
The purpose of learning "Hello world" is to learn build chains.
Not really, the purpose of using the "Hello world" is to verify the toolchain is working properly. You can learn how to make it work properly on the relevant documentation pages (e.g. http://doc.qt.io/qtcreator/creator-debugger-engines.html).
This guy is an jackass for trying to put the flaw back on me for not understanding something.
Indeed, he might very well be. I pointed out a flaw in putting blame, before knowing what the problem is and whose fault it is, not because of not knowing something.
So people can write offensive statements to me and I should just take it?
I don't see how my comment was offensive, but even if it was, a level-head approach works better than bursting out.
keep your "help" to yourself
I will follow that advice in the future.
-
@TigerBunny "keep your "help" to yourself" - no problem