QT install, fourth attempt
-
@BKBK said in QT install, fourth attempt:
From an older thread I learnt to select: Tools -> Option -> Build & Run. After getting there that thread said to verify that Creator is configured for VS 2017.
Huh? There is nothing there to do any such thing.The option used to be Tools > Options... > Build & Run > Kits.
In newer versions of Qt Creaetor, it's Tools > Options > Kits.
There is an internal contradiction that I do not know how to get to.... Please advise me as to what steps to take in order to get this going.
Your kit is configured to use the MSVC 2012 compiler.If you want to use Qt 5.12.0 for MSVC 2017, you must:
- Install the C++ dev tools for MSVC 2017 (This is not automatically included when you install Visual Studio. I asked you before if you have already done this, but you did not answer.)
- Tell Qt Creator where to find your MSVC 2017 compiler: http://doc.qt.io/qtcreator/creator-tool-chains.html
- Tell your kit to use the MSVC 2017 compiler:
I think I installed the optional compiler... I am not stuck on Visual Studio and will be happy to use that.... Edit: I am pretty sure option is: MinGW 4.9.2
Try my steps above first.
After that, decide whether you want to use MSVC or MinGW. Let us know your choice.
-
JKSH suggested: Install the C++ dev tools for MSVC 2017 ....
I am finding the term "dev tools" a bit imprecise.
I go to the control panel and apps, and find Visual Studio 2017 then select modify. Here are the things I can modify, which I presume means to install:
.NET desk development (getting this one)
Desk development with C++ (getting this one)
Universal Windows Platform development (getting this one)
ASP.NET and web development (getting this one)
Azure development
Python development (getting this one)
Node.js development
Data storage and processing
Data science and analytical applications
Office/SharePoint development
Mobile & Gaming, five items I have omitted
Visual Studio Extension development (getting this one)
Text states: Create add-ons and extensions for Visual Studio, including new commands, code analzers, and tool windows.
Linux development with C++ (getting this one)
.NET Core cross-platform development
and that is the limit of what is presented.Please tell me exactly what dev tool I need to install. I need something to search on.
-
@BKBK said in QT install, fourth attempt:
Please tell me exactly what dev tool I need to install.
The one with "C++" in its name, for Windows (You listed it as "Desk development with C++")
-
After installing all those goodies, include the item verified by JKSH, I try again.
I really feel like a dunce here. If someone could sit beside me they would be able to get this working in a few minutes.
I very much appreciate the time and patience from each of you.Starting from the beginning.
Launch QT Creator 4.8.0
Select Examples
Select Basic Layouts Example
From the new dialog select Running the Example
The dialog changes and displays: For more information, visit Building and Running an Example.
Click that link to open this web page:
http://doc.qt.io/qtcreator/creator-build-example-application.html
It regresses and advises: In the Welcome mode, select Examples (1).
Ok, follow those steps:
main.cpp is opened- In the Welcome mode, select Examples (1).
a. Did that to get the list of examples - Select Basic Layouts
a. Main.cpp is displayed - To check that the application code can be compiled and linked for a device, click the Kit Selector and select a kit for the device.
a. The only thing close is: Build -> Open Build and Run Kit Selector
b. To get a temporary dialog that I cannot capture to post. It states
c. The project basic layouts is not configured. You can configure it in the Projects Mode
d. The two words Projects Mode are a link so select that.
e. Back to the instruction: … select a kit for the device.
f. Now, what is a kit?
g. Click menu item Help -> Index
i. That is not an index.
h. Click Help -> Contents
i. No help
i. Internet search, here is a possibility: http://doc.qt.io/qtcreator/creator-targets.html
i. OK, got a possible definition of kit.
j. Back to the instructions: Select Tools > Options > Kits > Add.
k. There is an error indicator and shown here:
l. Notice the red circle enclosing an exclamation mark.
m. Hover the mouse over it, very carefully and just right, to get the same image I posted a few days ago.
n. There is an INTERNAL CONTRADICTION.
o. Please re-read that sentence at least once more.
p. The dialog states MSVC 2017, the title of the hover popup states MSVC 2017, but the text of the dialog states msvc2012-pe-64 bit.
q. I don’t know how to fix that, but will try anyway.
r. Click it to open the dialog and select Compiler -> C++
s. That field currently states: Microsoft Visual C++ Compiler 11.0 (amd64)
t. Ok, found two later candidates:
i. Microsoft Visual C++ Compiler 15.0 (amd64)
ii. Microsoft Visual C++ Compiler 15.0 (amd64_x86)
iii. There are versions with (amd64_x86) and (x86_amd64) Note the reversal of terms. I did not find anything that discussed that aspect.
u. Some searching “indicates” the better choice might be x86_amd64, select that for C and C++. I have an AMD processor so selected: amd64_x86.
v. For debugger only one choice: GNU gdb 7.8 for MinGW 4.9.2 32bit
w. Maybe I have a kit selected, don’t know for sure.
x. Click Apply, Ok
4. Step 4 says Click (Run) to build and run the application.
5. Don’t have that.
6. There is on in the bottom left corner that might bit it.
7. It is greyed out.
8. Go to menu item Build, Run is disabled.
9. Click Build -> Build file “main.cpp”
10. No noticeable results
11. Click Build -> Generate Compilation Database for “basiclayouts.”
12. No noticeable results. Build -> Run is not enabled.
13. Look along the bottom and see if there is anything in the 8 tabs there.
14. Nothing
Lets see if anything changed. Click Build -> Open and Build Run Kit Selector to get
Why are there three identical rows?
Examine each and the details are identical.
Get a hover dialog
There is a line tagged as Error: but I cannot determine what the error really is or how to correct it.
I stop here in the hopes that someone will point out my errors.
- In the Welcome mode, select Examples (1).
-
Use the
amd64
, what you selected now is a cross-compiler to do 32 to 64bit compilation.amd64
is the original name for the 64bit architecture known now as x86_64 because AMD were the first to produce a 64bit version of the x86 architecture. Soamd64
andx86_64
are synonyms. -
From SGaist I changed the selection to: Microsoft Visual C++ Compiler 15.0 (amd64) for both C and C++ compiler. Now the hover message looks better as it states:
Warning: The ABI of the selected debugger does not match the tool chain ABI.
It no longer has the warning about the compiler not working. As I started to chase down the VS debugger it occurred to me to ask:
The only option I am really aware of is Visual Studio. But I see things about the GNU tool chain. Which tool chain do I really want? Here are some drivers.
I am using G++ at work on a Centos Linux machine. There I am working Qt for interactive display and OpenGL to build a strip chart. Maybe that matters.
At home I have just started an Arduino project. The processor will sense temperatures, pressures, and currents in the compressor and air handler and provide data to an app on my PC. That app will show the status of our HVAC system. And that app is this Qt environment.
Have you a suggestion as to which tool set to select?
-
The debugger follows the same rule as the compiler: it must match the architecture.
As for the arduino, don't you have a specific tool chain for it ?
-
The Arduino does have its own IDE. I have installed that and it seems to be working.
Because of work I am leaning towards the GNU tool chain. I really don't know if there are any downsides to that so ask for opinions. I do have a Linux machine that I might fire up. However, I want to make my HVAC app available to most people and that audience is predominantly Windows.
What ever you, every read, suggests, it will be my decision, meaning only that I won't blame anyone. Still, I suspect there will not be a bad choice, just maybe one better than the other. -
Hi @BKBK,
On Linux you can use GCC and Clang, and if I remember correctly, both produce binary compatible code, so you can use both with one Qt version.
On Mac, IMHO, only Clang is used for a long time, probably because Apple said so.
For Windows, you can use the MSVC and the MinGW compiler with Qt.
For MSVC, you have to install the MS C++ compiler, the MS CDB console debugger and a suitable Qt MSVC version.
For MinGW, you can all install with the Qt online installer: the GCC compiler, the GDB debugger and the Qt MinGW version.
Both toolchains can create fully working Windows programs, however some external libraries are only supported on one of the two.
In Principle you can develop on one platform and you or someone else can compile on another platform, as long as you don't use System-specific APIs.
I hope that clearifies things a bit.
-
If you want a quick and easy setup to start using Qt then the MinGW version is the way to go. You can install everything in one go: Qt, the compiler and debugger.
-
@SGaist said in QT install, fourth attempt:
MinGW
I am going with MinGW.
I found the MinGW web site and I think I installed it. Not positive, but lets see what happens.
Open QT Creator and get to here
Click Manage Kits to get:How important is this Auto-detected versus Manual. I cannot tell. But I have MinGW installed and do not want MSVC so try to remove all the MSVC and install the MinGW.
Start with the Auto-detected by clicking on the item to get
Go to Compiler -> C++ and direct it to the MiGW directory.
No, that does not work.
Click on button Manage to the right. To get:
Don’t want all the Microsoft entries, there is a Remove button that is activated when a line is selected, so do a bunch of removes.
As this is being done manually, click on Manual -> C++, that does nothing.
Click on the Add button, not shown in the previous image.
Add -> MinGW -> C++ to get a selection dialog.
Browse to the path to get here
Question: What belongs in the fields: Platform codegen flags, Platform linker flags, and ABI?
To continue, click Apply. It does not acknowledge the button click.
Click OK. The form closes. But debugger was not set.
Click Manage Kits again and select debuggers to get
Note that it reports 32 bit. I have always selected 64. I don’t know how important this is so continue
Back to here: image Sunday 08
After all that work, Qt Creator is still set up for MSVC 2017.
I don’t know what to do different. Please advise. -
OK @BKBK, you've tried lots of different things recently and now you have numerous overlapping installations. It is best to start from scratch again.
If you follow these steps carefully and thoroughly, you will have a working system:
- In Qt Creator go to the Kits tab and Remove your 2 Manual kits ("Desktop" and "Unnamed"):
- Close Qt Creator.
- Go to the folder where you installed Qt (C:\Qt ?) and run MaintenanceTool.exe. Uninstall everything.
- Uninstall everything in C:\MinGW too.
- Run the Qt installer again. Select these 2 items (no more, no less):
- Qt > Qt 5.12.0 > MinGW 7.3.0 64-bit
- Qt > Tools > MinGW 7.3.0 64 bit
- Run Qt Creator and compile an example.
That's it. You don't need to install or configure anything else.
If it still doesn't work, do not change any settings; doing so will complicate things further. Post screenshots and we'll have a look.
Question: What belongs in the fields: Platform codegen flags, Platform linker flags, and ABI?
Those fields are for cross-compilers. You don't need them if you follow the steps above carefully and thoroughly.
- In Qt Creator go to the Kits tab and Remove your 2 Manual kits ("Desktop" and "Unnamed"):
-
@BKBK said in QT install, fourth attempt:
I found the MinGW web site and I think I installed it
Please don't!
Simply use Qt Online Installer or Qt Maintenance Tool (if Qt is already installed) and select Qt MinGW AND MinGW. It will install MinGW which is proven to work with Qt you're installing. -
@JKSH Ok then, I can build the example project. I had to add a few more steps to configure the project, but then it built and ran.
@jsulm Too late, I had already done that. Then I followed the instructions from JKSH, deleted everything, installed a fifth time, and now am up and running.
Qt is working now.
Thank you all for your time and patience.