I just configured the build after downloading the qt zip file.
I ran nmake in the x64 Native Tools Command Prompt for VS 2022 in admin mode. After going through a lot of process it ends abruptly with the error
Error opening .moc\release\moc_qaction.cpp.json for reading
Here is the image for the error .
This is my first time installing QT and building it.
Related
When attempting to build my Qt project with MSVC2015 64bit for Windows 10, I get this error:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\Ole2.h:37: error: C1083: Cannot open include file: 'objbase.h': No such file or directory
...
NMAKE:-1: error: U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.EXE"' : return code '0x2'
NMAKE:-1: error: U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\nmake.exe"' : return code '0x2'
-- when nmake is invoked during the build process.
This exact same error also occurs for the example project "addressbook".
It appears to be some kind of toolchain issue, but I can compile a Qt Widget project in Microsoft Visual Studio 2022 if I point VS at my Qt installation.
I'm not sure what I need to do from here, since I already tried a reinstall of Qt. I have seen that putting things in Program Files is generally a bad idea, but that doesn't seem to be the issue in this specific case.
It appears to be part of the Windows SDK, if Google leads me right. However, I did not have to download the Windows SDK separately in order to compile my project and run it successfully before. (For context, the project's been developed for a few months and this problem only emerged a week or so ago).
My QT Installation:
Kit: Desktop Qt 5.15.2 MSVC2015 64bit
Version: Qt 5.15.2 MSVC2015 64bit
Compiler: Microsoft Visual C++ Compiler 17.3.32811.315 (amd64)
Things That Have Happened Before My Build Attempt:
I recently reinstalled Qt 5.15.2 in an effort to resolve a similar missing file issue.
The company's recently had issues with Microsoft Intune deleting applications. Maybe it hit the Windows SDK too.
Attempts at Solving the Issue
Reinstallation of Qt 5.15.2
Expected: My project building without errors. Result: This error.
Search of file system for objbase.h
Expected: Finding the file. Result: I did not find the file.
I'm newish at Qt, so I didn't want to try anything more esoteric lest I made things worse than before.
Update: MinGW 64 bit works for the example Qt projects, but I'd still like to use MSVC2015 if possible. It doesn't work for my project because I use some MSVC specific pre-processor flags in my source.
Update 2: I attempted to re-download MSVC 2015 from Visual Studio's website, using their Build Tools installer. While the installation successfully finished, I got no change from before -- it still can't find that "objbase.h" file. It's supposed to be in the Windows Kits directory under Include//um , I think.
It appears that, in my case, the objbase.h file was deleted due to the issue with Windows Defender deleting random files. I was able to reinstall the version of Windows SDK that was using and this fixed the issue for me.
I figured it out. I'm posting the solution here for others.
My issue was that, for reasons that are unclear to me, VS Studio Build Tools would not actually remove the SDK in question if I unchecked its box in the Modify screen. You can tell if this is happening by checking the disk size difference of the upcoming installation in the lower right of the screen -- if it won't remove the SDK, that size will be +0 bytes (assuming you don't check or uncheck any other box).
In order to properly reinstall the SDK version, I had to go to "Add or remove programs" and find the SDK there, uninstall it, restart my computer just for safety, and then go to VS Build Tools and install that SDK version. I had to do a "fake" uninstall with VS Build Tools (basically, uncheck the now-deleted SDK and click "Modify", allowing it to do the installation and download steps) before I could actually install the SDK again.
I've been spending almost all day trying to get QT installed on my windows machine. I have installed QTCreator with QT 5.14.1 and QWT 6.1.3 (have also tried 6.2.0) and following these instructions with QWT: https://qwt.sourceforge.io/qwtinstall.html
Everything goes fine until I get to the same point where after running nmake it prints:
qwt.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_abstract_scale_draw.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_bezier.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
My path variables show that the include directory where type_traits exists is most definitely there.
Any pointers would be great. I'm not sure what else I can possibly do. I've uninstalled and reinstalled my entire .net framework, same with QT.
I ended up solving this, and it turned out to be an issue with the compilers I was selecting. I figure this could help people down the line so I will post what I documented on my company portal - the instructions I have written are as follows:
=====
Realistically, it doesn't matter which kit you select, as long as the compiler and QT version is set up correctly. What will indicate a correct kit setup is the display of a monitor logo at the label.
Configure a kit by first selecting it as default
C and C++ Compiler -> ''Microsoft Visual C++ Compiler 15.9.xxxx''
Compiler version 15.9.xxxx is a part of Microsoft Visual Studio 2017. If you cannot find this compiler in the drop down box, it is most likely because you are missing the 2017 install. Download the BUILD TOOLS and REDIST PACKAGE from here.
Debugger -> ''C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe''
If you can't find the debugger, it means you are missing the Windows 10 SDK. [[https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/|Download from here]].
QT Version -> ''Qt 5.14.1 MSVC 2017 32bit''
CMake generator (not sure how important this is, but it seems to make the compile run): Ninja
I just installed a clean install of the new .NET Core SDK on a CentOs 7 box. I had a different Linux VM I was running to test this and received the same error there.
I am building my application in VS 2017 on a Windows box and copying the project file over to the Linux box to test it. I am coming from netframework environment and trying to learn dotnetcore so I am sure this is probably just a newb issue. Here is what I am doing.
I run a dotnet restore, which works without error.
I run a dotnet build, which I receive a
Build succeeded.
0 Warning(s)
0 Error(s)
Then I run a dotnet run and receive the following error:
Error:
An assembly specified in the application dependencies manifest (apf-ws.deps.json) was not found:
package: 'System.Text.Encoding.CodePages', version: '4.3.0'
path: 'runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll'
Nowhere in my code do I actually reference any type of Encoding explicitly. I have tried including System.Text.Encoding.CodePages in my project to see if that would add a reference and bring in the library to ignore the one it is looking for, but it doesn't help. Anyone have any ideas of what would be causing this?
I tried several things before wiping the directory out in Linux and copying the files over again. In doing so it seemed to fix the problem.
I tried creating a new project, opening a few old ones but it won't seem to work on my computer and I don't get it. I have got MC Visual Studio 2012 installed and it works as asual but QT Creator is constantly giving me this error message that I think means that something is wrong with the compiler.
'cl' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\build-test-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile.Debug [debug\main.obj] Error 1
jom: C:\build-test-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile [debug] Error 2
12:53:56: The process "C:\Qt\Qt5.2.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project test (kit: Desktop Qt 5.2.1 MSVC2012 64bit)
When executing step 'Make'
Can anybody explain me how I can fix it ? ( I read somewhere that the reason is that my user folders name is written in cyryllic characters, but is really a pain in the ass to change the name of that folder so I hope that that is not the reason ^^"" )
I worked around this problem by starting Qt creator from an Qt command prompt, and within that command prompt I run vcvarsall.bat located in "Microsoft Visual Studio 10.0\VC"
So it is a path related problem.
Running Qt Creator 3.0 and VS 10 on Windows 8.1.
With reference to the question Build SQLite for Windows Phone 8
I am also having same problem with compiling SQLite for Windows Phone 8. I tried with
nmake -f Makefile.msc sqlite3.dll FOR_WINRT=1
I am compiling using VS 2012 X86 Phone Tools Command Prompt. And also I noticed it is picking proper cl.exe. But it is complaining about missing 'winreg.h' header file. I dont see this header file is available under Windows Phone kit folder.
vs console Log :
sqlite3.c
C:\Program Files (x86)\Windows Phone Kits\8.0\include\windows.h(182) : fatal err
or C1083: Cannot open include file: 'winreg.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\WPSDK\WP80\BIN\cl.EXE"' : return code '0x2'
Stop.
And also, I checked Makefile.msc, I dont find any specific compiler option available for WP8. I have successfully compiled for WIN RT following Tim Heuer Note.
See if this helps you with your issue.
Right click on the project where you are getting the error mentioned in your question.
Check for the Build and in Conditional Compilation Symbols paste SILVERLIGHT;WINDOWS_PHONE;USE_WP8_NATIVE_SQLITE
Hope this helps