chtěl jsem přejít z Arduina na Raspberry PI 3b. Místo Arduino IDE jsem chtěl používat Geany.
Už jsem přišel na to jak svůj program přepsat z jazyka Wirring na c++, ale už tři dny jsem se zasekl na tom jak nahradit sériový Plotter, nebo jak vykreslovat data. Dle diskuzí na netu by šlo použít GNU plot.
V příkazové řádce mi GNUplot funguje.
Kód: Vybrat vše
pi@raspberrypi:~ $ gnuplot
G N U P L O T
Version 5.2 patchlevel 6 last modified 2019-01-01
Copyright (C) 1986-1993, 1998, 2004, 2007-2018
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type is now 'wxt'
gnuplot> plot abs(x)
gnuplot>
Stáhle jsem gnuplot-iostream
https://github.com/dstahlke/gnuplot-iostream
http://stahlke.org/dan/gnuplot-iostream/
Má tam několik examplů, ale žádný nelze zkompilovat.
Kód: Vybrat vše
// Demo of vector plot.
// Compile it with:
// g++ -o example-vector example-vector.cc -lboost_iostreams -lboost_system -lboost_filesystem
#include <vector>
#include <cmath>
#include <boost/tuple/tuple.hpp>
#include "gnuplot-iostream.h"
int main() {
Gnuplot gp;
// Create a script which can be manually fed into gnuplot later:
// Gnuplot gp(">script.gp");
// Create script and also feed to gnuplot:
// Gnuplot gp("tee plot.gp | gnuplot -persist");
// Or choose any of those options at runtime by setting the GNUPLOT_IOSTREAM_CMD
// environment variable.
// Gnuplot vectors (i.e. arrows) require four columns: (x,y,dx,dy)
std::vector<boost::tuple<double, double, double, double> > pts_A;
// You can also use a separate container for each column, like so:
std::vector<double> pts_B_x;
std::vector<double> pts_B_y;
std::vector<double> pts_B_dx;
std::vector<double> pts_B_dy;
// You could also use:
// std::vector<std::vector<double> >
// boost::tuple of four std::vector's
// std::vector of std::tuple (if you have C++11)
// arma::mat (with the Armadillo library)
// blitz::Array<blitz::TinyVector<double, 4>, 1> (with the Blitz++ library)
// ... or anything of that sort
for(double alpha=0; alpha<1; alpha+=1.0/24.0) {
double theta = alpha*2.0*3.14159;
pts_A.push_back(boost::make_tuple(
cos(theta),
sin(theta),
-cos(theta)*0.1,
-sin(theta)*0.1
));
pts_B_x .push_back( cos(theta)*0.8);
pts_B_y .push_back( sin(theta)*0.8);
pts_B_dx.push_back( sin(theta)*0.1);
pts_B_dy.push_back(-cos(theta)*0.1);
}
// Don't forget to put "\n" at the end of each line!
gp << "set xrange [-2:2]\nset yrange [-2:2]\n";
// '-' means read from stdin. The send1d() function sends data to gnuplot's stdin.
gp << "plot '-' with vectors title 'pts_A', '-' with vectors title 'pts_B'\n";
gp.send1d(pts_A);
gp.send1d(boost::make_tuple(pts_B_x, pts_B_y, pts_B_dx, pts_B_dy));
#ifdef _WIN32
// For Windows, prompt for a keystroke before the Gnuplot object goes out of scope so that
// the gnuplot window doesn't get closed.
std::cout << "Press enter to exit." << std::endl;
std::cin.get();
#endif
}
Kód: Vybrat vše
g++ -std=c++17 -Wall -o "example-vector" "example-vector.cc" -l wiringPi (in directory: /home/pi/gnuplot-iostream)
In file included from /usr/include/c++/8/vector:69,
from example-vector.cc:5:
/usr/include/c++/8/bits/vector.tcc: In member function ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {boost::tuples::tuple<double, double, double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>}; _Tp = boost::tuples::tuple<double, double, double, double>; _Alloc = std::allocator<boost::tuples::tuple<double, double, double, double> >]’:
/usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<boost::tuples::tuple<double, double, double, double>*, std::vector<boost::tuples::tuple<double, double, double, double> > >’ changed in GCC 7.1
_M_realloc_insert(end(), std::forward<_Args>(__args)...);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/vector.tcc: In member function ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {double}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
_M_realloc_insert(end(), std::forward<_Args>(__args)...);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {boost::tuples::tuple<double, double, double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>}; _Tp = boost::tuples::tuple<double, double, double, double>; _Alloc = std::allocator<boost::tuples::tuple<double, double, double, double> >]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<boost::tuples::tuple<double, double, double, double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<boost::tuples::tuple<double, double, double, double>*, std::vector<boost::tuples::tuple<double, double, double, double> > >’} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {double}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1
In file included from /usr/include/c++/8/vector:63,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = boost::tuples::tuple<double, double, double, double>*; _ForwardIterator = boost::tuples::tuple<double, double, double, double>*; _Allocator = std::allocator<boost::tuples::tuple<double, double, double, double> >]’:
/usr/include/c++/8/bits/stl_uninitialized.h:311:2: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
return std::__uninitialized_copy_a
~~~~~~~~~~~~~~~~~~~~~~~~~~~
(_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = double*; _ForwardIterator = double*; _Allocator = std::allocator<double>]’:
/usr/include/c++/8/bits/stl_uninitialized.h:311:2: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
return std::__uninitialized_copy_a
~~~~~~~~~~~~~~~~~~~~~~~~~~~
(_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_vector.h: In copy constructor ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/stl_vector.h:463:31: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
std::__uninitialized_copy_a(__x.begin(), __x.end(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
this->_M_impl._M_start,
~~~~~~~~~~~~~~~~~~~~~~~
_M_get_Tp_allocator());
~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:63,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<boost::tuples::tuple<double, double, double, double>*>; _ForwardIterator = boost::tuples::tuple<double, double, double, double>*; _Tp = boost::tuples::tuple<double, double, double, double>]’:
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:289:37: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
{ return std::uninitialized_copy(__first, __last, __result); }
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*; _Tp = double]’:
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:289:37: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
{ return std::uninitialized_copy(__first, __last, __result); }
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >; _ForwardIterator = double*; _Tp = double]’:
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:287:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:289:37: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
{ return std::uninitialized_copy(__first, __last, __result); }
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<boost::tuples::tuple<double, double, double, double>*>; _ForwardIterator = boost::tuples::tuple<double, double, double, double>*]’:
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
uninitialized_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:134:15: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
return std::__uninitialized_copy<__is_trivial(_ValueType1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_trivial(_ValueType2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __assignable>::
~~~~~~~~~~~~~~~~~~
__uninit_copy(__first, __last, __result);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*]’:
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
uninitialized_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:134:15: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
return std::__uninitialized_copy<__is_trivial(_ValueType1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_trivial(_ValueType2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __assignable>::
~~~~~~~~~~~~~~~~~~
__uninit_copy(__first, __last, __result);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >; _ForwardIterator = double*]’:
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
uninitialized_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:115:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:134:15: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
return std::__uninitialized_copy<__is_trivial(_ValueType1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_trivial(_ValueType2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __assignable>::
~~~~~~~~~~~~~~~~~~
__uninit_copy(__first, __last, __result);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In static member function ‘static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<boost::tuples::tuple<double, double, double, double>*>; _ForwardIterator = boost::tuples::tuple<double, double, double, double>*; bool _TrivialValueTypes = false]’:
/usr/include/c++/8/bits/stl_uninitialized.h:76:9: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
__uninit_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:76:9: note: parameter passing for argument of type ‘std::move_iterator<boost::tuples::tuple<double, double, double, double>*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h: In static member function ‘static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<double*>; _ForwardIterator = double*]’:
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
__uninit_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:101:27: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
{ return std::copy(__first, __last, __result); }
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h: In static member function ‘static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >; _ForwardIterator = double*]’:
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
__uninit_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:99:9: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_uninitialized.h:101:27: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
{ return std::copy(__first, __last, __result); }
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:60,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_algobase.h: In function ‘_OI std::copy(_II, _II, _OI) [with _II = std::move_iterator<double*>; _OI = double*]’:
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
copy(_II __first, _II __last, _OI __result)
^~~~
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_algobase.h: In function ‘_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >; _OI = double*]’:
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_algobase.h:446:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_algobase.h:455:8: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(std::__miter_base(__first), std::__miter_base(__last),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__result));
~~~~~~~~~~
In file included from /usr/include/c++/8/bits/stl_algobase.h:67,
from /usr/include/c++/8/vector:60,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_iterator.h: In function ‘decltype (std::__miter_base(__it.base())) std::__miter_base(std::move_iterator<_IteratorL>) [with _Iterator = double*]’:
/usr/include/c++/8/bits/stl_iterator.h:1238:5: note: parameter passing for argument of type ‘std::move_iterator<double*>’ changed in GCC 7.1
__miter_base(move_iterator<_Iterator> __it)
^~~~~~~~~~~~
In file included from /usr/include/c++/8/bits/stl_algobase.h:61,
from /usr/include/c++/8/vector:60,
from example-vector.cc:5:
/usr/include/c++/8/bits/cpp_type_traits.h: In function ‘_Iterator std::__miter_base(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >]’:
/usr/include/c++/8/bits/cpp_type_traits.h:419:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
__miter_base(_Iterator __it)
^~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:60,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_algobase.h: In function ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator<const double*, std::vector<double> >; _OI = double*]’:
/usr/include/c++/8/bits/stl_algobase.h:420:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
__copy_move_a2(_II __first, _II __last, _OI __result)
^~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_algobase.h:420:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
In file included from /usr/include/c++/8/bits/stl_algobase.h:67,
from /usr/include/c++/8/vector:60,
from example-vector.cc:5:
/usr/include/c++/8/bits/stl_iterator.h: In function ‘_Iterator std::__niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container>) [with _Iterator = const double*; _Container = std::vector<double>]’:
/usr/include/c++/8/bits/stl_iterator.h:987:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const double*, std::vector<double> >’ changed in GCC 7.1
__niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it)
^~~~~~~~~~~~
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `boost::iostreams::stream<boost::iostreams::file_descriptor_sink, std::char_traits<char>, std::allocator<char> >::stream<int, boost::iostreams::file_descriptor_flags>(int const&, boost::iostreams::file_descriptor_flags const&, boost::disable_if<boost::is_same<int, boost::iostreams::file_descriptor_sink>, void>::type*)':
example-vector.cc:(.text._ZN5boost9iostreams6streamINS0_20file_descriptor_sinkESt11char_traitsIcESaIcEEC2IiNS0_21file_descriptor_flagsEEERKT_RKT0_PNS_10disable_ifINS_7is_sameIS9_S2_EEvE4typeE[_ZN5boost9iostreams6streamINS0_20file_descriptor_sinkESt11char_traitsIcESaIcEEC2IiNS0_21file_descriptor_flagsEEERKT_RKT0_PNS_10disable_ifINS_7is_sameIS9_S2_EEvE4typeE]+0x84): undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(int, boost::iostreams::file_descriptor_flags)'
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `boost::iostreams::file_descriptor_sink boost::iostreams::detail::wrap<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink const&, boost::disable_if<boost::iostreams::is_std_io<boost::iostreams::file_descriptor_sink>, void>::type*)':
example-vector.cc:(.text._ZN5boost9iostreams6detail4wrapINS0_20file_descriptor_sinkEEET_RKS4_PNS_10disable_ifINS0_9is_std_ioIS4_EEvE4typeE[_ZN5boost9iostreams6detail4wrapINS0_20file_descriptor_sinkEEET_RKS4_PNS_10disable_ifINS0_9is_std_ioIS4_EEvE4typeE]+0x20): undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(boost::iostreams::file_descriptor_sink const&)'
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `boost::iostreams::detail::concept_adapter<boost::iostreams::file_descriptor_sink>::concept_adapter(boost::iostreams::file_descriptor_sink const&)':
example-vector.cc:(.text._ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC2ERKS3_[_ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC5ERKS3_]+0x20): undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(boost::iostreams::file_descriptor_sink const&)'
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `boost::iostreams::detail::concept_adapter<boost::iostreams::file_descriptor_sink>::concept_adapter(boost::iostreams::detail::concept_adapter<boost::iostreams::file_descriptor_sink> const&)':
example-vector.cc:(.text._ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC2ERKS4_[_ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC5ERKS4_]+0x24): undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(boost::iostreams::file_descriptor_sink const&)'
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `int boost::iostreams::detail::write_device_impl<boost::iostreams::output>::write<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink&, boost::iostreams::char_type_of<boost::iostreams::file_descriptor_sink>::type const*, int)':
example-vector.cc:(.text._ZN5boost9iostreams6detail17write_device_implINS0_6outputEE5writeINS0_20file_descriptor_sinkEEEiRT_PKNS0_12char_type_ofIS7_E4typeEi[_ZN5boost9iostreams6detail17write_device_implINS0_6outputEE5writeINS0_20file_descriptor_sinkEEEiRT_PKNS0_12char_type_ofIS7_E4typeEi]+0x28): undefined reference to `boost::iostreams::file_descriptor::write(char const*, int)'
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `std::fpos<__mbstate_t> boost::iostreams::detail::seek_device_impl<boost::iostreams::any_tag>::seek<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink&, long long, std::_Ios_Seekdir, std::_Ios_Openmode)':
example-vector.cc:(.text._ZN5boost9iostreams6detail16seek_device_implINS0_7any_tagEE4seekINS0_20file_descriptor_sinkEEESt4fposI11__mbstate_tERT_xSt12_Ios_SeekdirSt13_Ios_Openmode[_ZN5boost9iostreams6detail16seek_device_implINS0_7any_tagEE4seekINS0_20file_descriptor_sinkEEESt4fposI11__mbstate_tERT_xSt12_Ios_SeekdirSt13_Ios_Openmode]+0x2c): undefined reference to `boost::iostreams::file_descriptor::seek(long long, std::_Ios_Seekdir)'
/usr/bin/ld: /tmp/ccyHMVRa.o: in function `void boost::iostreams::detail::close_impl<boost::iostreams::closable_tag>::close<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink&, std::_Ios_Openmode)':
example-vector.cc:(.text._ZN5boost9iostreams6detail10close_implINS0_12closable_tagEE5closeINS0_20file_descriptor_sinkEEEvRT_St13_Ios_Openmode[_ZN5boost9iostreams6detail10close_implINS0_12closable_tagEE5closeINS0_20file_descriptor_sinkEEEvRT_St13_Ios_Openmode]+0x30): undefined reference to `boost::iostreams::file_descriptor::close()'
collect2: error: ld returned 1 exit status
Compilation failed.