Using Qt with Visual C++ Compiler November 2013 CTP
-
wrote on 19 Mar 2015, 08:41 last edited by
I have installed MSVC 2013 and Qt 5.4.0, and use QtCreator 3.3.0.
I have a Qt project which needs to use an external static C++ library which is built by using the VC++ November 2013 CTP toolkit. The library requires this newer compiler since certain c++11 features are only enabled in this newer version of the compiler.
To use the library in my Qt project I need to use some of its headers, which then introduces these new c++11 features into my Qt project, and therefore I can no longer built my Qt project since it uses the original MSVC compiler.
I have two questions:
- Is it possible to some how get Qt/QtCreator to use the VC++ November 2013 CTP toolkit? if so, how?
- If not, does that mean I have to rebuild Qt/QtCreator with this new compiler? if so, how do I do this?
-
First, check if you can add the new compiler to Qt Creator in preferences. If yes, then you may be able to simply select it as default for your Kit.
If that does not work, try modifying the mkspecs (if this new compiler is compatible with the old one). Mkspecs are the compiler and environment definitions that Qt uses - you can find them in mkspecs folder in your Qt installation/ build dir. You definitely do not need to recompile Qt Creator - it is only an IDE.
If the compiler is not compatible, you will have to recompile Qt. Info: link you can skip the git part and download a ready-made .zip from qt.io downloads page.
-
The November CTP is not compatible so you will have to rebuild Qt with it.
But to be honest I would investigate if that library can't be rebuilt with something more sensible. 2013 November CTP is sorta pre-alpha quality. It's full of bugs and problems. I would think twice before shipping anything with it. If you need the newest c++ features I would consider the latest 2015 CTP as it's much more mature and closer to release quality (although not fully there yet either).
-
The November CTP is not compatible so you will have to rebuild Qt with it.
But to be honest I would investigate if that library can't be rebuilt with something more sensible. 2013 November CTP is sorta pre-alpha quality. It's full of bugs and problems. I would think twice before shipping anything with it. If you need the newest c++ features I would consider the latest 2015 CTP as it's much more mature and closer to release quality (although not fully there yet either).
wrote on 19 Mar 2015, 13:21 last edited by@Chris-Kawa I just installed the MSVC2015, however the QtCreator did not detect it.
I need to rebuilt my external library in this newer msvc, correct?
Then I have to rebuild Qt as well with this new msvc?
Should this be enough?
How do I get QtCreator to actually use this newer version of vc?
-
VS2015 is still in development so there's no official support for it in Qt Creator yet and no auto-detection. I guess for now you could add a custom compiler by hand (although I haven't tried that myself).
Yes, you would have to recompile that other library with VS2015.
As for compiling Qt, the current Qt 5.4.1 doesn't have a VS2015 mkspec so you would have to create that by hand or look for it in the current dev branch. I think it's already there for the next Qt version.
Just out of curiosity - which features of the compiler do you need with this? Latest VS2013 has partial support for c++11 and the most used features are there.
-
wrote on 24 Mar 2015, 08:39 last edited by
-Sorry for late reply @Chris-Kawa!!
Im using a library which has very new C++11 language features in its header files, things like constexpr, which are not supported by msvc2013 out of the box, it needs msvc2013 november ctp or newer versions. However, Qt itself does not work with these. That is the problem.
-
I have installed MSVC 2013 and Qt 5.4.0, and use QtCreator 3.3.0.
I have a Qt project which needs to use an external static C++ library which is built by using the VC++ November 2013 CTP toolkit. The library requires this newer compiler since certain c++11 features are only enabled in this newer version of the compiler.
To use the library in my Qt project I need to use some of its headers, which then introduces these new c++11 features into my Qt project, and therefore I can no longer built my Qt project since it uses the original MSVC compiler.
I have two questions:
- Is it possible to some how get Qt/QtCreator to use the VC++ November 2013 CTP toolkit? if so, how?
- If not, does that mean I have to rebuild Qt/QtCreator with this new compiler? if so, how do I do this?
wrote on 24 Mar 2015, 09:28 last edited by@bedeho
I am using Visual Studio 2013 Community edition and Qt and Qt Creator without any issues.
If you have installed Visual Studio 2013 CE and then install Qt 5.4 it should even install and setup everything right out of the box. -
-Sorry for late reply @Chris-Kawa!!
Im using a library which has very new C++11 language features in its header files, things like constexpr, which are not supported by msvc2013 out of the box, it needs msvc2013 november ctp or newer versions. However, Qt itself does not work with these. That is the problem.
-
@bedeho
I am using Visual Studio 2013 Community edition and Qt and Qt Creator without any issues.
If you have installed Visual Studio 2013 CE and then install Qt 5.4 it should even install and setup everything right out of the box.wrote on 27 Mar 2015, 10:52 last edited by@Zingam I am not talking about Visual studio 2013 community edition, I am talking about the 2013 november technology preview, which has new features. Qt does not work with that out of the box, and needs to be rebuilt, also QtCreator does not detect it as a proper kit.
-
@Zingam I am not talking about Visual studio 2013 community edition, I am talking about the 2013 november technology preview, which has new features. Qt does not work with that out of the box, and needs to be rebuilt, also QtCreator does not detect it as a proper kit.
-
@JKSH said:
Are you sure that the tech preview has more features than the final release?
It does. The details are in the announce blog post. But, as I said, it later on turned out it was quite buggy.
-
@JKSH said:
Are you sure that the tech preview has more features than the final release?
It does. The details are in the announce blog post. But, as I said, it later on turned out it was quite buggy.
@Chris-Kawa said:
@JKSH said:
Are you sure that the tech preview has more features than the final release?
It does. The details are in the announce blog post. But, as I said, it later on turned out it was quite buggy.
Ah. I learnt something new today!
1/12