using Qt 5.0 with Qt Creator and vs2010 compiler - visual-studio-2010

I recently decided to upgrade from Qt 4.X to 5, though now it has only vs2010 supported. Whenever I start Qt Creator I get that there isn't any compiler (and there are no options in the settings to set one).
Question:
How do I download the vs2010 compiler? Do I have to download vs2010 itself? Will I get a debugger as well?
I have tried this suggestion, but Qt didn't pick up the compiler: Using Visual Studio as a Compiler for QT Creator
Sorry if this question have been asked before, but I have been unable to find a source that explains what I should do.

Seems like you didn't install MSVC yet. Get it from Microsoft website.
Than download sources from Nokia. Unpack them to a new folder e.g C:\QtSources and compile them with MSVC. This instructions are working just fine.
Finally add them to Qt Creator in
Tools -> Options -> Building -> Qt Versions
by poiting to your new qmake executable in
C:\QtSources\bin\qmake.exe
Hope Qt 5 will work with free Express Edition of MSVC.

You shouldn't need to re-compile Qt, as the SDK version is built with msvc2010 32-bit. For debugging, you may need to download the Windows SDK 8. Qt Creator may auto-detect your compiler and debugger, but if not, proceed as follows:
Under Options/Build & Run/Qt Versions, point to qmake.exe
Under Options/Build & Run/Kits, set "Qt Version" to the one you just created, and set your compiler and debugger
The compiler should be auto-detected if it's on your system.
The debugger is something like C:\Program Files\Windows Kits\8.0\Debuggers\x86\cdb.exe.
Good luck!

Related

Is Microsoft C++ Build Tools available as portable (without installation)

We are currently using CUDA on windows which requires MS C++ Build tools installed. With every new version of the CUDA toolkit it happens that newer versions of Visual Studio are not supported. That's why we are using the MS build tools seperately so that the VS version doesn't matter.
Since its hard to guide our developers to install the right CUDA and MSVC version we have packaged it into NUGET packages so that the toolkit (especially NVCC) is in a defined version and location. Additionally we wanted to do this with MSVC but we couldn't find a good solution since the installer obviously does modifications on several places that we don't know.
Is there any good way to get the MSVC tools portable so that we can simply drop it into a folder and put the right pathes?
NVCC doesn't support GCC, otherwise I would have gone with this.

VS2010 with C++11 all feature support using QT creator

I would like to ask a question about VS2010 IDE environment with all the C++11 features. Currently we need to build our software where some libraries need C++11 all feature support but we are now still running VS2010 environment and currently we are not upgrading our VS2010 to VS2017 at this moment.
So Is there any way to build these library with alternative mentods like installing QT creator on Windows platform so that can use g++ 4.9.3 or later same as on linux ubuntu? I found some website mentioning about Cygwin installed on Windows but seems not clear how to do.
Thanks for your help!
The QT installer provides binary versions built with MinGW as well as MinGW itself, so just use those.

Why these Issues when installing Qt Creator afresh?

After a couple of days of trying to get Qt Creator to build a Windows GUI project I received from a colleague, I decided to remove my previous installation and re-install Qt from a clean slate.
Using the latest "Community" version installer from the Qt website, I selected the Qt toolchain version 5.11.2, including MinGW 5.3.0 32-bit, Qt Sources and Qt Scripts.
I did not select any MS Visual Studio related toolchains. However, on my machine there is an updated VS Community installed.
After installation was done, I started Qt Creator, and before even selecting a project to open, I get these errors reported in the Issues pane (in the image, also is the Help/About popup):
Why does Qt look for the MSVS scripts, and moreover, why is it not able to run cmd.exe as reported by the 1st error. The VS scripts are exactly in the reported path.
How should I eliminate theses errors?

How to debug in Qt Creator under Windows?

I want to have the same developing environment either in Linux and in Windows so I decided to use Qt Creator. But for some unknown reason I cannot trace my project in Qt Creator under Windows 7. I compile my program as DEBUG target, the resulting executable contains all debug info. After that I press F10 key to step over main function but instead of stepping it just brings program to run. Stepping into via F11 does the same thing.
Firstly I tried gdb shipped with MinGW but Qt Creator refused even to run it complaining that it should be Python capable. After that I have downloaded and installed gdb with Python support from
http://download.qt-project.org/development_releases/prebuilt/gdb/windows-7/qtcreator-gdb-7.4-MINGW32_NT-6.1-i686.tar.gz
as Qt Creator manual recommends but it just made that Qt Creator is able to start the debugger and nothing more, I could not do source level debugging anyway.
Qt Creator under Linux works fine with the same project, it traces, steps and shows the sources Ok. I run MinGW 4.8.1 and Qt Creator 3.1.1 under Windows 7 64bit and the same Qt Creator 3.1.1 version under Fedora Linux 64bit. How can I achieve source level debugging under Windows like under Linux I do?
The best thing is to use Visual studio express compiler and then install the windows debugging tools like specified here and configure qt-creator
Recent GDB builds shipped with MinGW are Python-enabled, and work out-of-the-box in Qt Creator. The link you found seems outdated.

Visual Studio 2010, PCL, Qt and 32-bit and 64-bit: How?

PCL 1.6 (Point Cloud Library) requires a stack of third-party libraries, including Qt. For this, they have individual installers for their libraries and Qt 4.8.0 for both Windows 32-bit and 64-bit support (yes, I am attempting to avoid building all of these from source). I require both 32- and 64-bit, separately. It looks like the 32-bit and 64-bit Qt installers write to the same installation folder and I fear that one will simply overwrite the other. Can I simply redirect the install location, say, Qt\4.8.0_64\ and Qt\4.8.0_32\ to differentiate the installs? Will this wreak havoc with paths and registry entries for PCL and my builds?
Yes you can. I have QT 4.8 and 5.0.2 on my machine. The environment variable QTDIR points to the ne you want. If you use Visual Studio and the QT addin you can have multiple QT version changeable by the QT options dialog.
Just remember to save this path in "environment variable". and also be careful when you build your project with CMake. Cmake might not find the new path, and you have to change it manually in cmake gui.

Resources