QWT installation errors - c++

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.

Related

Link error lnk1104 scintillia, visual studio command prompt 2017 using nmake

Hello i am trying to get into opensource, and i wasted the whole day yesterday trying to solve this problem. I am trying to build Scintilla for notepad++, and i had first allot of errors like certain files could not be found, or rc could not be found by visual studio command prompt.
I managed to fix those errors but there is a last one i cant figure out.
I have been following this
After building with the script provided, i run
nmake -f scintilla.mak
and the result:
LINK : fatal error LNK1104: cannot open file '..\bin\Scintilla.dll'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\link.EXE"' : return code '0x450'
Stop.
link -OPT:REF -LTCG -DEBUG -LIBPATH:F:\sources\boost_1_65_1\boost_1_65_1\bin.v2\libs\regex\build\msvc-14.1\release\link-static\runtime-link-static\threading-multi -DEF:Scintilla.def -DLL -OUT:..\bin\Scintilla.dll .\AutoComplete.obj .\CallTip.obj .\CaseConvert.obj .\CaseFolder.obj .\CellBuffer.obj .\CharacterCategory.obj .\CharacterSet.obj .\CharClassify.obj .\ContractionState.obj .\Decoration.obj .\Document.obj .\EditModel.obj .\Editor.obj .\EditView.obj .\Indicator.obj .\KeyMap.obj .\LineMarker.obj .\MarginView.obj .\PerLine.obj .\PlatWin.obj .\PositionCache.obj .\PropSetSimple.obj .\RESearch.obj .\RunStyles.obj .\Selection.obj .\Style.obj .\UniConversion.obj .\ViewStyle.obj .\XPM.obj .\HanjaDic.obj .\ScintillaBase.obj .\ScintillaWin.obj .\BoostRegexSearch.obj .\UTF8DocumentIterator.obj .\ScintRes.res KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB OLEAUT32.LIB
Microsoft (R) Incremental Linker Version 14.12.25835.0
Copyright (C) Microsoft Corporation. All rights reserved.
I solved it, turns out the bin directory was removed for some reason, i should have seen it sooner cause of the warning message.
To anyone who gets similar error, it means the directory or file you are trying to access is not there, so maybe faulty path or folder removed.

link.exe returns error LNK1181: cannot open input file 'C:\Program.obj'

I'm compiling with a Batch file containing
#echo off
set link=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link
"%link%" external_input.obj periodic_dinger.obj flagger.obj monitor.obj main.obj libGui.lib libCore.lib libCint.lib libRIO.lib libNet.lib libHist.lib libGraf.lib libGraf3D.lib libGpad.lib libTree.lib libRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libThread.lib
All the objects and libraries are in the same directory, which is the directory I'm executing the Batch file from, and also where the Batch file is located. I've tried adding the current directory to /LIBPATH:, but no luck. My LIB environment variable is
C:\Users\jroth\Data\online_monitor_v.0.5>echo %LIB%
"C:\Program Files\ (x86)\Microsoft Visual Studio 11.0\VC\LIB";"C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\ATLMFC\LIB";"C:\Program Files (x86)\Window
s Kits\8.0\lib\win8\um\x86";
I made sure that everything was quoted. The same error came up when everything was unquoted. The error verbatim is
C:\Users\jroth\Data\online_monitor_v.0.5>make
Microsoft (R) Incremental Linker Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link
LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'
make.bat is the name of the batch file I'm using to link this, not a makefile.
I'm running vcvarsall.bat before doing any of this.
The problem was with the environment variable link that you used. The MS linker also uses this variable for flags.
From https://msdn.microsoft.com/en-us/library/6y6t9esh.aspx:
The LINK tool uses the following environment variables:
LINK, if defined. The LINK tool processes options and arguments defined in the LINK environment variable before processing the command line.
So you can't use set link=..., you'll have to use another name. _link will do fine.

Building Qt for WinRT using Visual Studio 2013

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.

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.

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