How to use make command - c++

I am trying to install this library :
https://github.com/sfdodge/xnet
I have successfully installed xtensor and xtensor blas using conda. Now, when I make this library (as mentioned in read me), it generates the following error:
CMakeFiles/test_xNet.dir/build.make:62: recipe for target 'CMakeFiles/test_xNet.dir/src/FullLayer.cpp.o' failed
make[2]: *** [CMakeFiles/test_xNet.dir/src/FullLayer.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/test_xNet.dir/all' failed
make[1]: *** [CMakeFiles/test_xNet.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Edit:
Error:
In file included from /home/fatima/anaconda2/gcc/include/c++/string:48:0,
from /home/fatima/Downloads/xnet-master/src/FullLayer.hpp:4,
from /home/fatima/Downloads/xnet-master/src/FullLayer.cpp:1:
/home/fatima/anaconda2/gcc/include/c++/bits/stl_function.h:158:12: error: provided for ‘template<class _Tp> struct std::multiplies’
struct multiplies : public binary_function<_Tp, _Tp, _Tp>
^
In file included from /home/fatima/Downloads/xnet-master/src/mat.hpp:5:0,
from /home/fatima/Downloads/xnet-master/src/FullLayer.hpp:6,
from /home/fatima/Downloads/xnet-master/src/FullLayer.cpp:1:
/home/fatima/anaconda2/include/xtensor/xsort.hpp: In function ‘auto xt::sort(const xt::xexpression<E>&, std::ptrdiff_t)’:
/home/fatima/anaconda2/include/xtensor/xsort.hpp:190:43: error: ‘decay_t’ is not a member of ‘std’
return detail::flat_sort_impl<std::decay_t<decltype(de)>, eval_type>(de);

Related

‘tls’ is not a member of ‘asio::ssl::context’ C++ error

I am trying to build this github repository: https://github.com/socketio/socket.io-client-cpp
It is dependant on this repository https://github.com/zaphoyd/websocketpp
I got a few downloads while trying to build both and solved most with downloading libboost-dev and a few other libraries but i got an error that i can't seem to solve:
/home/ktbm/socket.io-client-cpp/src/internal/sio_client_impl.cpp: In member function ‘sio::client_impl::context_ptr sio::client_impl::on_tls_init(websocketpp::connection_hdl)’:
/home/ktbm/socket.io-client-cpp/src/internal/sio_client_impl.cpp:586:83: error: ‘tls’ is not a member of ‘asio::ssl::context’
context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tls));
^~~
CMakeFiles/sioclient_tls.dir/build.make:110: recipe for target 'CMakeFiles/sioclient_tls.dir/src/internal/sio_client_impl.cpp.o' failed
make[2]: *** [CMakeFiles/sioclient_tls.dir/src/internal/sio_client_impl.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sioclient_tls.dir/all' failed
make[1]: *** [CMakeFiles/sioclient_tls.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I haven't found anyone with a similar problem and i am not sure which library causes this issue, probably an old asio library but could also be a boost error

CAP_V4L is not a member of cv in cap_.open

I'm trying launch cv_camera with ros but I couldn't compile this package in ros, I launched this command:
catkin_make --only-pkg-with-deps rossumo cv_camera -DARDRONESDK3_PATH=~/out/arsdk-native/staging/usr
...
/home/docker/catkin_ws/src/cv_camera/src/capture.cpp: In member function ‘void cv_camera::Capture::open(const string&)’:
/home/docker/catkin_ws/src/cv_camera/src/capture.cpp:95:26: error: ‘CAP_V4L’ is not a member of ‘cv’
cap_.open(device_path, cv::CAP_V4L);
^
make[2]: *** [cv_camera/CMakeFiles/cv_camera.dir/src/capture.cpp.o] Error 1
make[1]: *** [cv_camera/CMakeFiles/cv_camera.dir/all] Error 2
What do you think I'm doing wrong?
Thanks!

'CORBA::LongDoubleSeq' has not been declared

I built omniORB-4.2.1 by VS2013+Cygwin(0.9.1-1) on Windows7 32bit.
I placed omniORB under C drive.
Then I tried to build SALOME-KERNEL by MinGW and got following error message related to omniORB.
[5%] Building CXX object idl/CMakeFiles/SalomeIDLKernel.dir/SALOME_ExceptionSK
.cc.obj
In file included from C:/omniORB-4.2.1/include/omniORB4/CORBA.h:221:0,
from c:/src/salome7/buildKernel/idl/SALOME_Exception.hh:6,
from c:/src/salome7/buildKernel/idl/SALOME_ExceptionSK.cc:3:
C:/omniORB-4.2.1/include/omniORB4/dynAny.h:151:47: error: 'CORBA::LongDoubleSeq'
has not been declared
virtual void insert_longdouble_seq(CORBA::LongDoubleSeq& value) = 0;
^
C:/omniORB-4.2.1/include/omniORB4/dynAny.h:171:20: error: 'LongDoubleSeq' in nam
espace 'CORBA' does not name a type
virtual CORBA::LongDoubleSeq* get_longdouble_seq() = 0;
^
idl/CMakeFiles/SalomeIDLKernel.dir/build.make:333: recipe for target `idl/CMakeF
iles/SalomeIDLKernel.dir/SALOME_ExceptionSK.cc.obj' failed
make[2]: *** [idl/CMakeFiles/SalomeIDLKernel.dir/SALOME_ExceptionSK.cc.obj] Erro
r 1
CMakeFiles/Makefile2:86: recipe for target `idl/CMakeFiles/SalomeIDLKernel.dir/a
ll' failed
make[1]: *** [idl/CMakeFiles/SalomeIDLKernel.dir/all] Error 2
Makefile:127: recipe for target `all' failed
make: *** [all] Error 2
Does anyone know how to this problem?
SALOME? omniORB? Which is the matter?

cygwin, compiling ncmpcpp: error: ‘postfix_increment_proxy’ is not a class template

i'm trying to compile ncmpcpp on cygwin. i got it to configure after wrestling with dependencies, but when i try to make this error pops up:
In file included from utility/comparators.h:26:0,
from utility/comparators.cpp:22:
./mpdpp.h: In constructor ‘MPD::Directory::Directory(const mpd_directory*)’:
./mpdpp.h:134:62: error: ‘mpd_directory_get_last_modified’ was not declared in this scope
m_last_modified = mpd_directory_get_last_modified(directory);
^
In file included from ./menu.h:26:0,
from ./format.h:26,
from ./settings.h:32,
from utility/comparators.h:27,
from utility/comparators.cpp:22:
/usr/include/boost/range/detail/any_iterator.hpp: At global scope:
/usr/include/boost/range/detail/any_iterator.hpp:131:15: error: ‘postfix_increment_proxy’ is not a class template
class postfix_increment_proxy<
^
/usr/include/boost/range/detail/any_iterator.hpp:176:15: error: ‘writable_postfix_increment_proxy’ is not a class template
class writable_postfix_increment_proxy<
^
Makefile:603: recipe for target 'comparators.o' failed
make[2]: *** [comparators.o] Error 1
make[2]: Leaving directory '/home/aritsune/ncmpcpp/src'
Makefile:455: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/aritsune/ncmpcpp'
Makefile:365: recipe for target 'all' failed
make: *** [all] Error 2
i'm new to compiling from source and this error seems pretty unique. what could be causing it?
It looks like you don't have all the prerequisites required. Always address the errors in the order they occur. The first error occurs in mpdpp.h, on line 134, mpd_directory_get_last_modified. If I Google mpd_directory_get_last_modified the first result is a link to documentation for libmpdclient. Make sure you have this library and your compiler can find it.
As for the Boost error, if you are using version 1.57, it sounds like this bug:
https://svn.boost.org/trac/boost/ticket/10754
which is discussed in this thread:
Can't compile boost/any_iterator.hpp in boost 1.57

Errors making cairo-gl

I'm building Cairo 1.12.14 with MSYS on Windows.
Successfully configured with --enable-gl=yes, however, when I run make, I get the following error:
make all-recursive
make[1]: Entering directory `/c/Users/Nathan/BuildCairo/cairo'
Making all in src
make[2]: Entering directory `/c/Users/Nathan/BuildCairo/cairo/src'
make all-am
make[3]: Entering directory `/c/Users/Nathan/BuildCairo/cairo/src'
CC cairo-png.lo
CC cairo-gl-composite.lo
In file included from cairo-gl-composite.c:48:0:
cairo-gl-private.h:250:40: error: unknown type name 'GLsizeiptr'
cairo-gl-private.h:258:8: error: unknown type name 'GLchar'
cairo-gl-private.h:262:22: error: unknown type name 'GLchar'
cairo-gl-private.h:273:23: error: unknown type name 'GLchar'
cairo-gl-private.h:276:5: error: unknown type name 'GLchar'
cairo-gl-private.h:290:5: error: unknown type name 'GLchar'
cairo-gl-composite.c: In function '_cairo_gl_texture_set_extend':
cairo-gl-composite.c:193:18: error: 'GL_MIRRORED_REPEAT' undeclared (first use i
n this function)
cairo-gl-composite.c:193:18: note: each undeclared identifier is reported only o
nce for each function it appears in
cairo-gl-composite.c: In function '_cairo_gl_set_operator':
cairo-gl-composite.c:387:9: error: implicit declaration of function 'glBlendFunc
Separate' [-Werror=implicit-function-declaration]
cairo-gl-composite.c:387:9: warning: nested extern declaration of 'glBlendFuncSe
parate' [-Wnested-externs]
cairo-gl-composite.c: In function '_cairo_gl_composite_begin':
cairo-gl-composite.c:751:41: warning: ignoring return value of '_cairo_gl_set_op
erands_and_operator', declared with attribute warn_unused_result [-Wunused-resul
t]
cc1.exe: some warnings being treated as errors
make[3]: *** [cairo-gl-composite.lo] Error 1
make[3]: Leaving directory `/c/Users/Nathan/BuildCairo/cairo/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/c/Users/Nathan/BuildCairo/cairo/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/Users/Nathan/BuildCairo/cairo'
make: *** [all] Error 2
Any ideas? Configure had this to say:
--- The OpenGL surface backend feature is still under active development and
--- is included in this release only as a preview. It does NOT fully work yet
--- and incompatible changes may yet be made to OpenGL surface backend
--- specific API.
Is this problem fixable for this version?