I have installed ‘Qt Creator 2.4.1 Based on Qt 4.7.4 (32 bit)’ on Windows 7 with Visual studio 2008. But on creating the basic project am getting following error :
c:\qtsdk\desktop\qt\4.8.1\msvc2008\mkspecs\win32-msvc2008\..\win32-msvc2005\qplatformdefs.h:67:
error: C1083: Cannot open include file: 'windows.h': No such file or directory
Also I checked the windows.h its present in following location : C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\
I would like to mention that I can’t use the MinGW target due to project specifications.
Requesting everyone to help me out of this situation.
in Qt Creator, Tools--Options, Build&Run, Kits, choose a kit and edit its attributes, change the Compiler from "Microsoft Windows SDK ..." to "Microsoft Visual C++ Compiler 9.0 (x86)".
I solved the same problem by this way.
Check Qt creator's Projects/Build Environment and edit variables
(INCLUDE, LIB, OSINCLUDES, OSLIBRARIES, PROGRAMFILES, SDKDIR, SDKTOOLS, WINDOWSSDKDIR)
that contains Windows SDK 7.1 path(C:\Program Files **(x86)\Microsoft SDKs\Windows\v7.1**).
Maybe Windows SDK 7.1 is installed at "C:\Program Files\Microsoft SDKs\Windows\v7.1"
Related
I am trying to install Qt4.8.7 for Windows 10 and I am having some issues with installing the corresponding compiler.
I got the Qt4.8.7 installer from this link: https://download.qt.io/archive/qt/4.8/4.8.7/ and I have tried working with the MSVC2010 and the mingw versions. For the MSVC2010 version, I followed this guide https://wiki.qt.io/How_to_setup_MSVC2010 (with a lot of dead links) and installed the compiler alongside the MSVC service pack 1 and Windows SDK 7.1. I have not been able to find an installer for Visual Studio 2010 or the VS service pack 1. Qt studio recognises the version of qt I have installed alongside the corresponding MSVC2010 x86 compiler but when I compile I get this error for a missing header: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h:26: error: C1083: Cannot open include file: 'ammintrin.h': No such file or directory".
For the mingw version, I have not been able to find the correct version "mingw482" and other versions I have tried do not seem to be compatible. I have tried mingw installer programs as well as using the QT online installer to try and find the correct version but I haven't had much luck when compiling.
Has anyone got qt4.8.7 running on windows recently? If so, could you please point me in the right direction for installing the correct compiler?
Many thanks.
Here a short description for getting it to work with Visual Studio 2008 and the newest Qt Creator 4.13.
You will need:
Visual Studio 2008 Express for the build tools, there are no standalone build tools as far as I'm aware
Qt 4.8.7 precompiled for VS2008 from this link to Qt archives at the time of writing this the version you need is called "qt-opensource-windows-x86-vs2008-4.8.7.exe"
Any Windows debugger cdb.exe
Steps (all absolute paths are standard installation paths):
Install VS2008
Install Qt 4.8.7
Open your Qt Creator go to Tools->Options...->Kits->Tab Compilers and search for "Microsoft Visual C++ Compiler 9.0", it probably won't be there so you will need to add it by hand by looking for the vcvarsall.bat of this compiler. You will find it in C:/Program Files(x86)/Microsoft Visual Studio 9.0/VC/vcvarsall.bat. Repeat for C, C++, x86 and x64. Press save
Open the Qt-Versions tab and look for Qt 4.8.7 Version. It will probably not be there again so add it by hand by selecting the qmake.exe from C:/Qt/4.8.7/bin/qmake.exe. Press save
Open the Kits tab and add a new kit. Select your Qt 4.8.7 version and the MS compilers for C and C++, your favorite debugger and input the Qt-makespec win32-msvc2008. Press save again
Now you should be able to compile your project from Qt Creator and Qt-colored-commandline. For integration of MSVC 9.0 into Visual Studio 2015 and newer you will also need to install Visual Studio 2012 Express. In that order:
VS2008
VS2012 (Here MS programmed in some magic so newer VS can see older build tools)
VS201x
It could work in any other order but don't rely on it. Also it could just flat out not work and you will waste a week of your life to fix it; but then it will work.
Haven't tested it but I could imagine the same workflow will work for VS2010.
I did not compile Qt myself, rather I used installer from official Qt website (5.6 beta is available since few days ago). Installation was successful, Qt folder conatins bin folder with qmake and everything. Building apps in Qt Creator works.
However, when I try to launch Qt using VS addin 1.2.5.9 I get error
No default Qt version found. Pleae check your Qt Visual Studio Add-in
settings.
I have edited QT5 -> Qt Options to contain the correct Qt path to 5.6 beta, error still persists.
I have also added QTDIR into Path in Windows 10.
I am using Community Edition of Visual Studio 2015
How to fix this? Create new Qt project under VS fails as well.
The Qt Visual Studio add-in is no longer supported in Visual Studio 2015.
Microsoft decided to deprecate AddIn support in Visual Studio 2013 and with Visual Studio 2015 all support for it has been removed. This is covered in https://bugreports.qt.io/browse/QTVSADDINBUG-404. However, there's an extension called Qt5Package you can install instead.
I found when I tried to add Qt 5.6.0 Beta in the extension I got the error "This Qt version uses an unsupported makefile generator (used: MSVC.NETMSBUILD, supported: MSVC.NET, MSBUILD)". The workaround is in C:\Qt\Qt5.6.0\5.6\msvc2015\mkspecs\common\msvc-desktop.conf Qt 5.6.0 splits all the version-specific changes into a separate file msvc-base.conf. If you copy the contents of this file and replace the line "include(msvc- base.conf)" in mscv-desktop.conf then Qt5Package recognises the Qt 5.6.0 Beta with no problems.
Note this still needs to be fixed in Qt5Package.
I created a application in linux and now I am trying to import this application to windows which is 64-bit. I installed Qt creator(64-bit) and imported the project.I am using certain libraries like omniORB4 which are built on 64-bit.Now when I try to build the application I get the following error:
module machine type 'x64' conflicts with target machine type 'x86'
Qt Version : Qt 5.3.1 (MSVC 2013, 64 bit)
Visual Studio :2010
When I imported the project in Qt on windows there was a option to configure the project and it showed only " Microsoft Visual C++ Compiler 10.0(x86)" in the options. I think I am getting this error because my compiler is x86. there are few other compilers which are shown in Project Properties but when I select them it gives me a error. Is there any way that I can change my compiler to x64 in QT and what are the other options that I can follow to resolve this issue. I looked into many links but still no luck.
I have installed qt 5.2.1 and Visual Studio 2012 in Windows 7 x64 (I have codepage 1251 if it matters). I use vs11 compiler.
Firstly I tried to run 'Rebuild all' action and I have received an error connected with cl.exe.
Then I added the path to vs11/bin to PATH variable (where cl.exe file is located; strange but it is in Program Files x86 folder) and have received the error: mspdb110.dll is missing. What should I do next? How to build the project?
Add to PATH path of directory with this dll. It's in something like C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64. If you have not such file in entire system, I guess you should reinstall Visual Studio.
error: LNK1123: failure during conversion to COFF: file invalid or corrupt
I'am getting this error every time I try to build any project on my Qt Creator.
I have VS2010 installed and the compiler version set to MSVC C++ compiler 10.0(x86).
I have Qt 5.2.1 MSVC2010 32bit OpenGL.
This error appears because you have installed VS 2012 after you have actually installed VS 2010 in your system.
It can be solved if you install SP1 for VS2010.
An other solution is to go to
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
and check the version of cvtres.exe. If the date is 03/18/2010 go to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and copy cvtres.exe then replace it On
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
This error may occur when.Net Framework updated to 4.5.x. To resolve this error
You can change project properties as "Enable Incremental Linking -> "No (/INCREMENTAL:NO)".
Or, uninstall the .Net Framework 4.5.x and install .NET Framework 4.