I begin to learn qt one month ago. I want to compile a static library for qt.
I follow the following instructions:
1: download the latest qt source code
2: configure -static -platform win32-msvc2013 -nomake tests -nomake tools -no-sql-sqlite
3: nmake
step1 and step 2 work well. After more than one hour running nmake, I come to some error as below.
I have search the www for answers, even though many people have questions similar to mime, none solve my problem. Hope someone can help me.
Qt 5.7.0; Qt Creator 4.1.0; win7 64; vs2013
mimetypemodel.cpp
.\mimetypemodel.cpp(74) : error C2440: '<function-style-cast>' : cannot convert from 'initializer-list' to 'QStringList'.
NMAKE: fatal error U1077: ""D:\program Files(x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"" : return code "0x2"
Stop
Related
I want to build Qt 5.4.1 form source with MSVC2013 under windows 10 condition.
However, when I do the configuration, it just stopped without any errors.
I downloaded qt-everywhere-enterprise-src-5.4.1.zip and unzip it.
I installed active perl ver5.2.6, python 3.7.6, ruby devkit 2.7.6 and added there path to environment variables.
And then, in the Developer Command Prompt for VS2013, typed
path_of_src\qtbase\configure -platform win32-msvc2013
then it shows me the following messages and just stopped configuration.
+ cd qtbase
+ ...\qt-everywhere-enterprise-src-5.4.1\qtbase\configure.bat -top-level -platform win32-msvc2013
Qt: Untested Windows version 10.0 detected!
This is the Qt
(and I even did not put -top-level option)
I think some words and process should be followed after 'This is the Qt' sentence, but there wasn't.
Also it doesn't show me any error messages so I'm stuck in a labyrinth now...
Please let me know if you have any idea or need further information.
Thank you in advance.
Best wishes,
JESuh
I need to build an octomap on visual studio 2017. According to website they have asked to do the following
open a windows shell (e.g., from the START-Menu -> QT)
cd octovis/src/extern/QGLViewer
qmake -t vclib QGLViewer.pro -spec win32-msvc2010 (ignore any warnings)
So I did the same but in windows command prompt terminal and when I feed the above commands it throws the following error:
#qmake -t vclib QGLViewer.pro -spec win32-msvc2010
Could not find qmake spec 'win32-msvc2010'.
Error processing project file: QGLViewer.pro
#qmake -t vclib QGLViewer.pro -spec win32-msvc2017
Could not find qmake spec 'win32-msvc2017'.
Error processing project file: QGLViewer.pro
What should I do in order to configure and generate a QGLViewer.vcxproj?
Additional details:
Project location : "C:\software\octomap-1.9.0\octomap-1.9.0\octovis\src\extern\QGLViewer"
qmake location : C:\vcpkg\packages\qt5-base_x64-windows\tools\qt5
Visual studio : 2017 ( Version 15.9.8)
Any help in regards to this would be much appreciated as I have a very limited understanding on qmake.
You can build QGLViewer with Qt Creator instead, and then it just works - I was bashing my head against the same issue as you for a while, but then just tried that and it solved my problems. For what it's worth, I used Qt Creator 4.12.4 and did a build all.
I had a few other issues building Octovis on Windows that you might run up against as well. See here for the changes I had to make: https://github.com/OctoMap/octomap/compare/devel...sgolodetz:winchanges
I am trying to build the static version of Qt and i am currently running into an issue with NMAKE (I think).
Part of the build process here states that I should run the following command:
configure -debug -nomake examples -nomake tests -skip qtwebengine -opensource
when i run the command i get the following error
LINK : fatal error LNK1104: cannot open file 'libucrt.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x450'
Stop.
Previous to this i had an error about missing corecrt.h so i added the following to the make file to sort that error out.
set CL=/I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"
I know that the files i need are located at:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt
But i am unsure on how to let link.exe know about them.
Thanks in advance
So it turns out i was having problems with the prefix being incorrectly set so going back to the first command it was modified to the following:
configure -debug -nomake examples -nomake tests -skip qtwebengine -opensource -static -prefix C:\QT\qt-everywhere-src-5.10.1 -redo -recheck-all
Where the argument after -prefix is the build location (in my case this is the same as the source directory)
Thanks for your help
I've downloaded and installed the QT SDK and downloaded the QT Mobility source.
Following the provided instructions, I navigated to my QtMobility directory via the Visual Studio Command Prompt (2010)... note, this is the QtMobility dir with the bin, plugins, examples, etc. folders.
D:\
cd D:\Files\Downloads\QtMobility
configure
Regardless of whether I gave configure a -prefix parameter or not, the following output was displayed:
Checking available Qt
4.8.2
Checking make
... Unknown target environment .
Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
Aborting.
Of course, I then went to see if my computer had nmake in its PATH: the directory is added as follows:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
I went to CMD and typed in "nmake /?" to receive proper output.
What am I doing wrong? When I try to simply run nmake in the QTMobility directory, it displays:
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
Help, please! Thank you. :) I will continue attempting debugs on my own...
I suppose this is late but you could simply run the visual studio command prompt, as it has specific env. variables preset to find nmake, etc.
I'm trying to compile Qt 4.5.1 on Windows XP targeting wince50.
I have the prerequisites installed (VS2008, WinCE50SDK, ActivePerl 5.10) and have downloaded the qt-embedded-wince-opensource-src-4.5.1.zip which has been installed in c:\Qt\4.5.1 and c:\Qt\4.5.1\bin has been added to the path.
From a VS command prompt, I navigate to c:\Qt\4.5.1 and execute the following:
configure -platform win32-msvc2008 -xplatform wince50standard-armv4i-msvc2008 -qt-gif -qt-libjpeg -qt-libpng -webkit -openssl -arch windowsce -opensource -iwmmxt
and I get the following error:
c:\qt\4.5.1\include\qtcore\../../src/corelib/tools/qvector.h(758) : fatal error C1083: Cannot open include file: 'QtCore/QPointF': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
I've tried this with previous versions of Qt, down to 4.4.3 and on two differnt XP machines (one with a clean build) and with various different configure options. Every time I get the same error.
What am I missing?
UPDATE:
OK, I've got a little further, though it's probably a dead end.
If I use qt-all-opensource-src-4.5.1 as a base then run configure it succeeds to build qmake, but then fails on missing wince files. So I then take the src and include folders from qt-embedded-wince-opensource-src-4.5.1 and copy them over the top of the qt-all folders then configure completes successfully.
But then nmake fails with the following error:
tmp\obj\debug_shared\qtmain_win.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\lib.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
The fact that configure worked with this approach implies to me that the qt-embedded-wince-opensource-src-4.5.1 release has missing content.
Any suggestions as to what to try next to get this to compile would be very welcome.
Have you set up the environment variables correctly? I.e. it's often nice to have a .bat with the respective INCLUDE and LIB definitions. If you've installed Qt, there's a Qt command shell installed that can serve as a nice template, giving you command prompt that has the correct environment variables depending on which Qt version you want to use.
So did I - make sure you downloaded the WinCE package and NOT the Windows installer as this doesn't have support for WinCE.
qt-embedded-wince-opensource-src-4.5.1.zip doesn't seem to be missing files, it contains include\QtCore\QPointF as it should. I tested that source package and I can configure fine.
Does the file c:\Qt\4.5.1\include\QtCore\QPointF exist after you extract the source package?
I may be grasping at straws here, but: what program did you use to unzip the sources? The filename in your error message is displayed all in lower case, did your unzip program convert all files to lower case? Are you using a case-sensitive filesystem? (I don't know if that's even possible on Windows...) This may be a red herring, for all I know cl.exe arbitrarily lowercases filenames in error messages.
If this doesn't help, please post some more of the error, so we can tell what precisely is failing to compile and what arguments were passed to cl.exe.