Building Qt for WinRT using Visual Studio 2013 - c++

I downloaded the Qt for Windows Runtime Technology Preview from this location:
http://download.qt-project.org/development_releases/qt/winrt-tp/
When I try to build it using the instructions mentioned here, I eventually run into the following error:
win_flex --noline --nounistd --outfile=Tokenizer.cpp ..\..\..\..\3rdparty\angle\src\compiler\preprocessor\Tokenizer.l
'win_flex' is not recognized as an internal or external command, operable program or batch file.
NMAKE : fatal error U1077: 'win_flex' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
How do I fix this?

Try this:
When you extract the sources, it will have a directory structure like this:
.....\qtbase-opensource-src-5.3.0-WinRT-TP\qtbase-opensource-src-5.3.0-WinRT-TP\bin
.....\qtbase-opensource-src-5.3.0-WinRT-TP\qtbase-opensource-src-5.3.0-WinRT-TP\src
The compilation script just looking for win_flex in a directory named gnuwin32.
This directory and its content can be found at https://qt.gitorious.org/qt/qt5/source/4c925babf9e7f516479a0e418e9b3f509d3cd4b7:gnuwin32 or in the complete Qt5-Sources (WinRT Technology Preview Sources are just a subset).
Copy this directory to the path, then it should look like this:
.....\qtbase-opensource-src-5.3.0-WinRT-TP\qtbase-opensource-src-5.3.0-WinRT-TP\bin
.....\qtbase-opensource-src-5.3.0-WinRT-TP\qtbase-opensource-src-5.3.0-WinRT-TP\src
.....\qtbase-opensource-src-5.3.0-WinRT-TP\gnuwin32\
NOTE 1: Downloading win_flex from sourceforge or add it to the PATH variable does not work! Compilation script searching win_flex hard-coded in the gnuwin32 directory!
NOTE 2: I posted a comment on the official blog post, maybe the guys from Digia will fix the WinRT-TP-Source-Package soon...

I installed win_flex from http://sourceforge.net/projects/winflexbison/
Then in my source, I went to the directory:
.....\qtbase-opensource-src-5.3.0-WinRT-TP\qtbase-opensource-src-5.3.0-WinRT-TP\src\angle\src\compiler\preprocessor
and changed both Makefile.debug and Makefile.release to make sure that "win_flex" and "bison" commands are executed with their full paths specified from their install directories. This fixed the above mentioned problem.

Related

Qt nmake: error C3203: 'map': unspecialized class template can't be used as a template argument for template parameter 'base', expected a real type

I am getting this problem when I issue the nmake command in the VS2015 x86 Native Tools Command Prompt when trying to compile Qt:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\hash_set(17): error C2338: <hash_set> is deprecated and will be REMOVED. Please use <unordered_set>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(228): error C2923: 'std::map': 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type argument for parameter '_Pr'
with
[
_Kty=lucene::index::IndexReader::CloseCallback,
_Ty=void *,
_Pr=lucene::index::IndexReader::CloseCallbackCompare,
_Alloc=std::allocator<std::pair<const lucene::index::IndexReader::CloseCallback ,void *>>
]
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/index/IndexReader.h(96): note: see reference to class template instantiation 'lucene::util::CLSet<lucene::index::IndexReader::CloseCallback,void *,lucene::index::IndexReader::CloseCallbackCompare,lucene::index::IndexReader::CloseCallbackCompare,lucene::util::Deletor::Dummy>' being compiled
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(229): error C2923: 'std::map': 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type argument for parameter '_Pr'
with
[
_Kty=lucene::index::IndexReader::CloseCallback,
_Ty=void *,
_Pr=lucene::index::IndexReader::CloseCallbackCompare,
_Alloc=std::allocator<std::pair<const lucene::index::IndexReader::CloseCallback ,void *>>
]
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(230): error C3203: 'map': unspecialized class template can't be used as a template argument for template parameter 'base', expected a real type
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
I have followed these steps to set up Qt and I'm running into the error at step 6.
Any thoughts? I appreciate it.
This is a bug in QT before version 5.5 when compiling with visual studio 14.0.
I guess you are trying to compile version 4.8.
Look into below link.... You can see your error.
https://bugreports.qt.io/browse/QTBUG-45961
You may need to download version Qt5.5 or above to compile with visual studio 14.0.

eclipse and VC++6: NMAKE fatal error U1073

I keep getting this error when I try to conifg my Eclipse to debug my VC6 program:
NMAKE : fatal error U1073: don't know how to make 'LN_BASE.CPP'
Any advice?
this is because nmake cannot find the src file;
i
move the code file from src dir to project root dir, then the problem solved.

Why does compiling Wireshark from source fail?

I have been following this documentation to compile Wireshark from source:
http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html
I am running these commands from going to Start > 'All Programs' > Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt
I am also calling "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" but I believe this may be done for me with the VS2008 Command Prompt.
Here is the output of my nmake -f Makefile.nmake verify_tools :
Checking for required applications:
cl: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/cl
link: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/link
nmake: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/nmake
mt: /cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/bin/mt
bash: /usr/bin/bash
bison: /usr/bin/bison
flex: /usr/bin/flex
env: /usr/bin/env
grep: /usr/bin/grep
/usr/bin/find: /usr/bin/find
peflags: /usr/bin/peflags
perl: /usr/bin/perl
C:\Python27\python.exe: /cygdrive/c/Python27/python.exe
sed: /usr/bin/sed
unzip: /usr/bin/unzip
wget: /usr/bin/wget
After this I continue to run the commands:
nmake -f Makefile.nmake setup
nmake -f Makefile.nmake distclean
nmake -f Makefile.nmake all
After calling the last command ('all'), The compilation runs for several minutes and comes to tshark-tap-register.c
tshark-tap-register.c(6) : error C2182: 'File' : illegal use of type 'void'
tshark-tap-register.c(6) : error C2146: syntax error : missing ';'
before identifier 'STDIN'
It continues in this fashion, citing increasing line numbers with the same errors. Finally, it halts, outputting :
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
If anyone has suggestions on things to try, I would greatly appreciate it!
Since you are building the development snapshot out of SVN, you probably just pulled a revision that had an error somewhere that caused tshark-tap-register.c to be incorrectly generated. Both 43154 and 43155 build for me without issue.
Unless you need the bleeding-edge features in the development branch, you should in stead get the latest stable source distribution from the Wireshark Downloads page in the future.

QWT installation errors

I started using Qt a few weeks ago and I am really enjoying it. I now need to include graphs in my application and, after some research, I found that Qwt was the best way of doing so (rather than having to do everything from scratch by myself). I've been at it for a couple of days, and I can't figure out how to install it. I am using windows7 32 bit. I followed the instructions in the INSTALL file:
from cmd ->
qmake qwt.pro
nmake
after nmake finishes I am left with errors
C:\Users\Peyo\Downloads\qwt-6.0.1>qmake qwt.pro
C:\Users\Peyo\Downloads\qwt-6.0.1>nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cd src\ && "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\nmake.e
xe" -f Makefile
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\nmake.exe" -f Make
file.Debug all
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
moc qwt_dyngrid_layout.h
moc qwt_magnifier.h
moc qwt_panner.h
moc qwt_picker.h
moc qwt_text_label.h
moc qwt_legend.h
moc qwt_legend_item.h
moc qwt_plot.h
moc qwt_plot_renderer.h
moc qwt_plot_canvas.h
moc qwt_plot_panner.h
moc qwt_plot_picker.h
moc qwt_plot_zoomer.h
moc qwt_plot_magnifier.h
moc qwt_sampling_thread.h
moc qwt_scale_widget.h
moc qwt_abstract_slider.h
moc qwt_analog_clock.h
moc qwt_compass.h
moc qwt_counter.h
moc qwt_dial.h
moc qwt_knob.h
moc qwt_slider.h
moc qwt_thermo.h
moc qwt_wheel.h
compiling .\qwt_abstract_scale_draw.cpp .\qwt_interval_symbol.cpp .\qwt_clipper.
cpp .\qwt_color_map.cpp .\qwt_column_symbol.cpp .\qwt_interval.cpp .\qwt_dyngrid
_layout.cpp .\qwt_math.cpp .\qwt_magnifier.cpp .\qwt_panner.cpp .\qwt_null_paint
device.cpp .\qwt_painter.cpp .\qwt_picker.cpp .\qwt_round_scale_draw.cpp .\qwt_s
cale_div.cpp .\qwt_scale_draw.cpp .\qwt_scale_map.cpp .\qwt_spline.cpp .\qwt_tex
t_engine.cpp .\qwt_text_label.cpp .\qwt_text.cpp .\qwt_event_pattern.cpp .\qwt_p
icker_machine.cpp .\qwt_point_3d.cpp .\qwt_point_polar.cpp .\qwt_scale_engine.cp
p .\qwt_symbol.cpp .\qwt_system_clock.cpp .\qwt_curve_fitter.cpp .\qwt_legend.cp
p .\qwt_legend_item.cpp .\qwt_plot.cpp .\qwt_plot_renderer.cpp .\qwt_plot_xml.cp
p .\qwt_plot_axis.cpp .\qwt_plot_curve.cpp .\qwt_plot_dict.cpp .\qwt_plot_direct
painter.cpp .\qwt_plot_grid.cpp .\qwt_plot_histogram.cpp .\qwt_plot_item.cpp .\q
wt_plot_intervalcurve.cpp .\qwt_plot_spectrogram.cpp .\qwt_plot_spectrocurve.cpp
.\qwt_plot_scaleitem.cpp .\qwt_plot_seriesitem.cpp .\qwt_plot_marker.cpp .\qwt_
plot_layout.cpp .\qwt_plot_canvas.cpp .\qwt_plot_panner.cpp .\qwt_plot_rasterite
m.cpp .\qwt_plot_picker.cpp .\qwt_plot_zoomer.cpp .\qwt_plot_magnifier.cpp .\qwt
_plot_rescaler.cpp .\qwt_raster_data.cpp .\qwt_matrix_raster_data.cpp .\qwt_samp
ling_thread.cpp .\qwt_series_data.cpp .\qwt_scale_widget.cpp .\qwt_plot_svgitem.
cpp .\qwt_abstract_slider.cpp .\qwt_abstract_scale.cpp .\qwt_arrow_button.cpp .\
qwt_analog_clock.cpp .\qwt_compass.cpp .\qwt_compass_rose.cpp .\qwt_counter.cpp
.\qwt_dial.cpp .\qwt_dial_needle.cpp .\qwt_double_range.cpp .\qwt_knob.cpp .\qwt
_slider.cpp .\qwt_thermo.cpp .\qwt_wheel.cpp
NMAKE : fatal error U1077: 'echo' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\bi
n\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
there are three errors:
NMAKE : fatal error U1077: 'echo' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\bi
n\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
And I can't figure out how to solved them. Please help! If I am missing any details, let me know and I'll add them. Thanks!
Try running this from Visual Studio command prompt, it set special vcvars stuff you don't have when running in windows command prompt
Better used mingw32-make instead of nmake.
It should work.
I hope your problem will be solved.

I can't manage to compile Qt + PortAudio sur Qt

I am trying to compile Qt + PortAudio on Visual Studio 2010. I made a new Makefile project in visual (Visual C++/General/Makefile project). I am getting this error:
Error 8 error MSB3073: The command "qmake & nmake" exited with code 2. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets 38 6 my_babel
Error 7 error U1077: 'c:\Qt\4.7.4\bin\qmake.exe' : return code '0x2' c:\Users\Ju\documents\visual studio 2010\Projects\my_babel\my_babel\NMAKE my_babel