QT support for Visual studio 2012 ultimate edition
-
Hi All ,
I was building QT application using Visual studio 2008 previously with the help of QT add-on for VS2008 on windows Platform. I was using QT4.8 SDK to build the applications and generated binary were working fine .
But Recently i upgraded/migrated to Visual Studio 2012 Ultimate edition and installed Visual Studio Add-in 1.2.1 without upgrading my QT SDK. It was compiling and generating binary and unfortunately the when i execute the binary its crashing. when i troubleshoot the cause of crash i found QString.toStdString().c_str() was giving junk value and the same statement works fine with prev binary.
How to solve this problem ? there is no QT 5 SDK for Windows 32-bit available which can run on VS12.
What call can i take it now ? Is my migration is completed ? any other changes need to be done. Please Help me -
with Qt 5.1 there will be a MSVC 2012 32bit precompiled package available (RC was just "released":http://download.qt-project.org/development_releases/qt/5.1/5.1.0-rc1/ these days).
The Qt VS plugin 1.1.x should also work with MSVC 2012 AFAIK.
For Qt 5 you need to use VS plugin 1.2.xAre you mixing your msvc2008 compiled Qt binaries with your msvc2012 application binaries?
-
no. i'm taking msvc2008 Visual studio projects into VS2012
-
When i'm trying to install Qt VS plugin 1.1.x , it was failing to install and poping up the message saying "
The installer could not find an installation of Visual Studio 200x.Please note the Visual c++ express is not supported." -
ah sorry...seems that the VS plugin 1.1.x indeed doesn't support MSVC 2012.
But you can go for Qt5 right? and use VS plugin 1.2.x.To come back to your crash: I was asking if you use msvc2008 compiled Qt binaries in your msvc2012 project?
-
No . the crash issue is solved since i'm using Qt5 with VS plugin 1.2.x.
-
I'm facing problem with the qt SDK given by the above link.
I've written a flash pass-through dll using the given SDK, which intern loads adobe flash Dll.
But my pass-through works fine with debug mode binaries .But it was crashing when i used release mode binaries.
Basically a qt web-view application will load this pass-through to play some videos. -
[quote author="raven-worx" date="1371646737"]with Qt 5.1 there will be a MSVC 2012 32bit precompiled package available (RC was just "released":http://download.qt-project.org/development_releases/qt/5.1/5.1.0-rc1/ these days).
The Qt VS plugin 1.1.x should also work with MSVC 2012 AFAIK.
For Qt 5 you need to use VS plugin 1.2.x
[/quote]It in fact does NOT. I just tried installing the 1.1.11 in VS2012 Premium. See post "here":http://qt-project.org/forums/viewthread/31965/
-
[quote author="raven-worx" date="1371720230"]ah sorry...seems that the VS plugin 1.1.x indeed doesn't support MSVC 2012.
[/quote]So in a sense there is then no Qt4 support for VS2012. The 1.1.11 add-in makes that connection. It DID work as of VS2010
-
just because the addin doesn't support an MSVC version it doesn't men that you can't use the MSVC version to compile Qt.
You just don't have the comfort that comes with the addin and will have to do the whole work (moc steps, etc.) by yourself.I found "feature request":https://bugreports.qt-project.org/browse/QTVSADDINBUG-168 targeting this issue.
-
[quote author="raven-worx" date="1377870042"]just because the addin doesn't support an MSVC version it doesn't men that you can't use the MSVC version to compile Qt.
You just don't have the comfort that comes with the addin and will have to do the whole work (moc steps, etc.) by yourself.[/quote]True and I can build apps in assembler too. Sarcasm aside, it is a big inconvenience not having the add-in. Until the lines between Qt Creator and VS blur together, you at times need both tool sets.
-
you can use QtCreator (setup with msvc compiler) to develop your Qt specific parts and still use Visual Studio for the rest.
You just loose the dependency building in this case...If that's an option for you.
-
[quote author="raven-worx" date="1377870901"]you can use QtCreator (setup with msvc compiler) to develop your Qt specific parts and still use Visual Studio for the rest.
You just loose the dependency building in this case...If that's an option for you.[/quote]
Options are always better than not having any. May be the ONLY option. I commented the "bug":https://bugreports.qt-project.org/browse/QTVSADDINBUG-168#comment-213673
I'm not sure if that even would work given the dependency issues mentioned. Going to do a test...
EDIT:
There seems to be a problem with the tool set. If a project that works perfectly when build using Qt Creator is them loaded into VS2012 with the 1.2.2 add-in, I get the following errorError 2 error MSB6006: "CL.exe" exited with code -1073741515. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets 147 5 ImageViewer (Visual Studio 2010).
If I change the tool set to use Visual Studio 2012 (v110) I get:
Error 3 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in main.obj C:\Users\Default.WIN-SHC18RVLNPH\Documents\ImageViewer\qtmaind.lib(qtmain_win.obj) ImageViewerBottom line: There may not be any available options using VS2012 with Qt4!
-
[quote author="raven-worx" date="1377870901"]you can use QtCreator (setup with msvc compiler) to develop your Qt specific parts and still use Visual Studio for the rest.
You just loose the dependency building in this case...If that's an option for you.[/quote]
Tried a test - it doesn't work.
-
this definitly works ...
what exactly isn't working?! -
[quote author="raven-worx" date="1377891306"]this definitly works ...
what exactly isn't working?![/quote]Look up in the thread...