cmake problems with qt creator hello world - c++

How can I choose platform for cmake with QT creator?
This is my project settings:
My cmake settings (what i am supposed to put as platform/kit?):
This gives me gives me crazy output here:
Whats wrong here? I do have rc.exe in my path:
UPD: As asked, I've checked vcvars32.bat:
(what am I expected to see here also??):

I have managed to walkaround the problem in the end by removing MSVC2017, Windows SDK and reinstalling MSVC 2015 + Windows SDK for W10. But this is not enough, in this crazy dialog:
you have to select ...ninja+codeblocks and this allows to run cmake sucessfully. Why VS14 setting here causes problems -- this remains a mystery for me.

Related

Qt crashes when I try to execute any program

I've looked for an answer during a few days and I haven't found anything similar anywhere;
I downloaded Qt from the official website, installed it and apparently compiling is fine. But whenever I try to execute (Ctrl+R) any app, even the basic one which only displays a window or widget, QtCreator itself crashes. No error message, nothing, just crashing.
I've tried to redownload and reinstall it a few times with different settings, but nothing will do.
I'm running QtCreator on Windows 7 64 bits. I'll try on my laptop which is also running windows and will update if I find anything.
Any help would be appreciated, I need to start a project as soon as possible. I'm relatively new to QT and if you need info on anything just ask me. Thanks :)
Use dependency walker, http://www.dependencywalker.com/
and post any missing dependencies. It is possible some install targets or options are missing from when you installed QtCreator, which can be resolved with the maintenance tool in the same directory you installed Qt.
Also, are you using the Visual Studio compiler(must have Visual Studio installed separately, and mark the option during install), or the Ming compiler(2 options checked during install or maintenance)?
Check if your antivirus is locking it, I had a similar issue time ago and it was due to antivirus (Avast specifically). Disable antivirus' realtime shields and try to execute a basic app.
It is necessary to use QtCreator? I use QtDesigner snd VS2013 and things go very well. :)
check this thread Qt Creator Plain C++ Project won't run/debug... and this C++ - QtCreator doesn't show any output

QT - Unknown debugger type "No engine"

Recently I have re-installed QT (5.5.1 MSVC 2013, 32 bit, rev. b52c2f91f5) on my PC and installed the debugging tools of Microsoft.
QT (QT Creator) can auto-detect these just fine.
When trying to start the debugger with either the default shortcut F5 or clicking it manually, it throws an error that the debugger could not be run. (Compiling works fine, debugging not at all)
No debugger-engine of type "No engine" could be created.
(Running Windows 8.1 with VS2013/VS2015 installed - QT working with VS2013 32&64 bit).
On my work PC I did the same process a few weeks ago and had no problems at all.
What could cause this problem ? Yet I have only found questions with the same problem related to other compilers.
It may point to a missing component in your installation process or an actual defect in Qt:
Option #1
Install a debugger.
If you are installing 5.5.1 for Visual Studio 2013 64 or 32bit, 2012
32bit, 201032bit. Then install windows Debuggers.
Qt will detect automatically the compiler and Debugger.
To set manually Tools->options->build&run->kits->set one of auto detected , then
you can see all.
Source: https://forum.qt.io/topic/59974/unknown-debugger-type-no-engine/11
Option #2
Unable to create a debugger engine of the type "No engine"
in the past pointed to a bug in the Qt Creator, if you'll update it may be fixed.
I'm also aware that alternatively, it may be solved by updating to Python 2.7.1.
Close Qt Creator.
In the folder where your .pro file resides, there will be some .pro.user and .pro.user.x files. Delete them all. Keep only your .pro file.
Start Qt Creator and open your .pro file. Qt Creator will ask you to reconfigure your project. Accept that.
Now you can debug again, or at least I could; the problem happened to me when I had just updated Qt Creator.
I had a problem in windows 7 but I've solved it:
Download Windows driver kit
https://www.microsoft.com/en-us/download/details.aspx?id=11800
Add your debugger
Change auto-detected kit debugger to your added debugger
I installed Debugging Tools for Windows and the debugger appeared under Manage Kits > Build & Run > Debuggers but it didn't added in the kits so I had to go to Manage Kits > Build & Run > Kits then select the desired kit and under Debugger I had to select the debugger. Initially the debugger is set to "None".
Answering the title of this question, not the person asking it.
I had the exact same error message on arch linux 64 trying to compile for arm android.
First I ran the gdb debugger in the command line to get the root issue:
~/tools/android/android-ndk-r12/prebuilt/linux-x86_64/bin/gdb-orig:
error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
libncurses is the issue! (As of 6/24/2016) Arch linux is on ncurses 6.0-4. Later you'll also find libtinfo.so.5 is missing.
At this point, the method for fixing the problem is up to you; I don't like using a bunch of AUR repos, so I executed a simple hack. We're forcing the library linkage that was in libncurses 5x to point at 6x.
Please ensure you don't overwrite anything before running these commands
cd /usr/lib
sudo ln -s libncursesw.so.6.0 libncurses.so.5
sudo ln -s libncursesw.so.6.0 libtinfo.so.5
Re-run your arm gdb, and it should work.

Qt Libraries are not included

I checked if the question exists but it doesn't seem to help me. I'm clearly new to Qt, i installed Qt Creator 5.4 in my Windows 7 Ultimate. I installed everything Qt 5.4 provides and also installed MinGW 4.9.1. The problem is when i open a console application project it immediately gives these errors. I tried different projects and error is the same.
Project ERROR: Unknown module(s) in QT: core
I tried to check intellisense for include and it didn't show ANY library to me.
When i hover to include it gives : QCoreApplication: No such file or directory
I highly doubt Qt can't find it's own libraries. How can i show it to QtCreator ?
Additional info : Run button and everything related to run is disabled.
Any help will be appreciated, thanks :)
Maybe your project's path contains non ASCII characters.
Try a new project somewhere like C:\MyApp

compiling Qt using nmake gives Command line error D8021 : invalid numeric argument ‘/FS’

I’m trying to deploy my Qt application to windows and I’m getting an error when I run nmake about /FS being an invalid numeric argument. It looks like it’s some kind of compile flag that’s not being recognized by the compiler. I have no idea on how to fix this and there doesn’t seem to be any information than what's already provided here http://qt-project.org/doc/qt-5/windows-deployment.html.
I posted my original question here Deploying a Qt 5.3 App on Windows
This person has the same problem Deploying a 32-bit Qt 5.3.0 app (Stand-Alone)
I’m on Qt 5.3 with Visual Studio 2013. As both question shows it seems to be running cl and nmake from VS 2010. I’m going to bet this is where the problem lies
Thanks for any help with this problem
Use cl.exe version 18.x to compile.
Had the same problem and it was me calling the wrong vcvars32.bat from qtenv2.bat, basically was using MSVC2010 with Qt for MSVC2013
As edwinc mentioned, compiler version should be 18.x
Qt 5.4.1, VS 2013. Fixed the issue by editing
C:\Qt\Qt5.4.1\5.4\msvc2013_64\mkspecs\win32-msvc2013\
removing faulty parameter from
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t
I ran into this same problem trying to compile the deprecated QtHttp and QtFtp modules for Qt5. You're right that the cause of the problem is a mismatch in MSVC compiler versions. Here are some of the things I found out for others encountering this:
qmake is going to pull in the mkspecs from qtbase. So if you built Qt with one compiler and try to compile an individual module using a VS command prompt from a different version, it won't care that you used the correct vsvars bat.
qmake can be passed the -spec flag to force it to use a given spec. E.g. qmake -spec win32-msvc2010.
Compiling Qt with one compiler version and your app with another will probably compile and link fine. Then it will crash or fail to start when you try and run it, at best. Worst case, you'll get weird subtle bugs at runtime.
If you had multiple Qt Kits installed, potentially due to running multiple Qt Creators, switching between kits could lead to such problems. Be meticulous in ensuring that you're using the right Qt Kit and, if it's an auto detected kit, then you're using the right Qt Creator.
With your project opened, review your kit:
Options > Build & Run
Select Kits tab
Ensure your kit is selected
In addition consider clicking on "Make Default" to set it as your default kit
That kit should now appear in italic bold
Do a QMake follow by a Rebuild
Did you try compiling with VS itself? Does it work?
Anyway, try checking C1.dll in your C:/windows/... folder (try searching the directories below it), is it an old one which being created like, 5 years ago? If so, you may want to replace it with a newer version such as those included inside your VS2013 folder.

Eclipse live error checking disabled

Few days ago I had to reinstall all my Linux system, and I also had to reinstall Eclipse CDT as I used to work with it since few weeks.
Unfortunately, since then I do not have live error checking anymore... and I miss it ;)
If I create a new Hello World C++ project (New / C++ Project / Hello World C++ project) and then add some errors like calling a method from an nonexistent class or adding any undefined or untyped variable, well Eclispe doesn't underline and report them as it was doing before I had to reinstall it all.
I searched stackoverflow, and tried to deactivate/reactive "Build automatically" without any change. I also verified that the project path is included in the project sources (Project properties / C-C++ general / Path and Symbols / Source Location) but as it already was, it didn't solved the problem.
When I "Build All" the errors are well reported in the "Problems view", and then when I fix one problem and save the file, the error disappear from the Problem view, but then if I add another problem and save, nothing is reported until I build again. Even errors turned to comments still remains underlined until the next "build all".
Do you have any idea to help me reactivate this feature ?
I was under Eclipse Linux 3.5 and I now use Eclipse Linux 3.7.
I installed the Eclipse package: Eclipse C/C++ IDE Indigo SR-1 with Eclipse Platform 3.7.1 and that fixed the problem.
So I guess, there was a problem with the 3.7.0 currently provided by the Ubuntu Software Center.
With this new version all is Ok by default.