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.
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.
The Problem
I cannot stress this enough but I have looked as far as I can over the internet for a solution and either they didn't have a solution or all they did was add a support ticket. The problem is that after creating a python qt quick application I try opening the QML file but when I go to the design tab it give me this error:
Code
The Designer is very finicky and can crash for various reasons. I've had success seeing the actual errors causing this dialog by launching Creator from the command line with debugging enabled:
QT_LOGGING_RULES="qtc.nodeinstances.init.debug=true" "/Applications/QtCommercial/Qt Creator.app/Contents/MacOS/Qt Creator"
That's specific to macOS but the like approach should work on any OS.
Look for error messages related to "Puppet". That's the name of the subprocess that actually renders the QML for Designer.
You can also go to Preferences -> Qt Quick -> QML Emulation Layer and try the opposite of the current setting and see if it works any better.
The solution that works for me is as follows:
OS: windows 10
Go to Tools >> Options >> Qt Quick >> (tab) Qt Designer
In the "Use fallback QML emulation layer", you see the placeholder path there. Switch it to C:\Qt\Tools\QtDesignStudio\bin or use browse if you have a different install location for Qt such that path\to\QtDesignStudio\bin
Boy do I have a FIX for you guys. I had been screwing around with this same issue to no avail, until I came across an error that wouldn't let me download qt3d (something) and I know that was part of the installation choices so I decided to uninstall everything. A thing to note when uninstalling: the Maintenance Tool doesn't uninstall everything. There were still Qt files located in C:\Users\user\AppData\Roaming I needed to delete those. Also, I needed to go into the Registry Run >>> Regedit >>>> Edit >>> Find >>> then search for Qt and that brought up all of the QT keys that still remained. I just deleted them one by one. For the Reinstall I practically installed everything (within reason) here's the list of my installation selections. Happy Hunting Fellow Qt'errr's!
Qt 5.15.2
Web Assembly
MSVC 2015-64BIT
MSVC2019-32BIT
MSVC2019-64BIT
MinGW 8.1.0 32BIT
MinGW 8.1.0 64BIT
UWP ARMv7 (MSVC 2015)
UWP x64 (MSVC 2015)
UWP ARMv7 (MSVC 2019)
UWP x64 (MSVC 2019)
UWP x86 (MSVC 2019)
Android
SOURCES
Developer and Designer Tools
Qt Creator 4.15.1 CDB Debugger Support
Debugging Tools for Windows
Qt Creator 4.15.1 Debug Symbols
Qt Creator 4.15.1 Plugin Development
Qt 3D Studio 2.8.0
-MinGW 8.1.0 32BIT
MinGW 8.1.0 64BIT
Qt 3D Studio OpenGL Runtime 2.8.0
MinGW 7.3.0 64Bit
Qt Installer Framework 4.1
Cmake 3.19.2 32bit
Cmake 3.19.2 64bit
Ninja
License: I chose L GPL
I chose Cmake not qmake
Graphic drivers were the issue in my case. Try updating or changing them.
Maybe that your Direct3D driver seems to have issues with Qt.
The error can be avoided by defining:QT_OPENGL=software in the Windows environment.
Assuming the root cause is the display driver of your computer.
Please reference:
https://bugreports.qt.io/browse/QTCREATORBUG-23455
I am on windows 10 using qt creator 4.8.2 and i am having errors in deploying my application. The errors states that (the application was unable to start correctly 0xc00007b) even though i have installed all the needed DLL files. I have been trying to use dependency walker and Qt 5.9.8 (MSVC 2013 64-bit) for the file input. I am in need of help thank you.
Dependency walker and Qt 5.9.8 (MSVC 2013 64-bit)
(the application was unable to start correctly 0xc00007b)
Recently I tried to upgrade Qt to 5.8.0 on Windows 7 32bit from Qt5.6.2 MSVC 2013, and I saw strange issues.
I downloaded and installed Visual Studio 2015 from this link: https://www.visualstudio.com/downloads/
After I installed Qt 5.8.0 MSVC 2015 version, Qt Creator 4.2.1 can be launched. From the welcome page, I selected the example named: "Address Book Example". And then after clicking "Configure" project, the project is listed in Qt Creator.
Now I tried to build the project, which was successful. But when I tried to run the project, I got the following error messages:
Starting C:\Qt\Examples\Qt-5.8\widgets\itemviews\build-addressbook-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\debug\addressbook.exe...
The program has unexpectedly finished.
C:\Qt\Examples\Qt-5.8\widgets\itemviews\build-addressbook-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\debug\addressbook.exe crashed.
I didn't see this kind of error before when I was using Qt5.6.2 with MSVC 2013. I also tried the following things:
Reinstall Qt5.8.0 MSVC 2015 using offline installer
Reinstall Qt5.7.1 MSVC 2015 using offline installer
Reinstall Qt5.6.2 MSVC 2015 using offline installer
Reinstall Qt5.8.0 using online installer, in which I chose MSVC 2013 and MSVC 2015
I still kept getting the same error messages.
When I went to the debug folder, double clicked the exe file, it said some Qt dlls were missing. I then manually copied to the debug folder, then the exe can be run with no problem.
Now I want to run app from inside Qt Creator, but not sure what is the issue with Qt Creator 4.2.1. I researched in Google for a few hours, but still cannot find out the reason why Qt Creator cannot run projects even it's own Example projects. (same errors for my own projects)
I feel it must be something to do with Qt creator environment/settings. Anyone has any ideas about this problem?
Update 1:
I tried to use MinGW with Qt Creator, the addressbook example can be run correctly. Looks like it's related to MSVC 2015. I need MSVC 2015, because all other environments don't support webenginewidgets, and I got:
:-1: error: Unknown module(s) in QT: webenginewidgets
Not sure if this is a bug in Qt or Qt creator.
Update 2:
In my Qt Creator, I saw warning icons for MSVC 2013 and MSVC 2015 compilers, please see the screenshots below:
I finally resolved the issue. The reason is that the Windows 10 SDK is missing.
After I download and install all default components of the Windows 10 SDK, everything worked on Windows 7 32bit.
Basically, to make sure we can use Qt5.8.0+ on Windows (including Qt WebEngine), we need to install both:
Visual Studio 2015, and
Windows 10 SDK
I'm late but I've found the main culprit is "ucrtbased.dll".
I didn’t install Windows 10 SDK.
I'm on Windows 7 SP1 x64, Qt 5.9.2 with Visual Studio Build Tools 2015 (v14.0.25420.1) and Windows 8.1 SDK with MS Debugger Tools (CDB) installed. The Release Configuration builds are without any issue but the Debug Configuration exhibits the same crash behavior. The fix is simple. The normal install of Visual Studio Build Tools 2015 with Win8.1 SDK places "ucrtbased.dll" in "C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" for 64-bit and "..\x86\ucrt" for 32-bit builds - even the Windows 10 SDK is not installed. If these are included in system path, or copied to the Qt's current project build folder, the issue is simply resolved.
I would like to write an application for Windows CE. I have already followed all the relevant steps, and started to write the application with Qt Creator.
However, when I started to build the code, there was the following error message:
QtCored4.lib(QtCored4.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
Maybe some more details:
I downloaded the library for Windows CE and I configured Qt-Opensource-Version 4.8.3 with following parameters:
configure -platform win32-msvc2008 -xplatform wince50standard-armv4i-msvc2008
All went well. Qt Creator did recognize the new version and added Windows CE as supported platform.
Now, I guess, that there will be the same problem with QtGuid4.lib. Does anybody know, where I get a compatible file?
The import library for a DLL - the .LIB file - contains machine code stubs that are linked into your program, that call through the import table for the EXE. Therefore, they have to match the processor family that you're compiling for.
You need to obtain the .lib file for the Windows CE ARMv4I build of QtCored4.dll. Try these instructions for building Qt for Windows CE.