How do i install socket.io c++ client library - c++

I am trying to use socket.io c++ client implementation.I have never used an external library before with c++ so im confused.
This is the library i am trying to use:
https://github.com/socketio/socket.io-client-cpp
So i followed this instructions:
https://github.com/socketio/socket.io-client-cpp/blob/master/INSTALL.md
Installed boost and cmake as its stated and i guess it is fine.
My problem is with the 4th step and the rest of it.
If i run
make install
console throws:
make: *** No rule to make target 'install'. Stop.
current dir looks like:
To be honest i didnt understand what is 5th step, and the installation process in general.How should i include this library in my main.cpp so that i can use it ? What are those visual studio project files generated ?
Edit:
If i open INSTALL visual studio project file and build INSTALL project from solution explorer,i get this error:
Edit2:
After updating websocketpp library now i get this error after build:

if you are having lots of issues this is how i solved mine:
boost 1.7.0 was not working for me.I installed boost 1.65.0
after that update websocketpp library
go to C:\socket.io-client-cpp\.git\modules\lib\websocketpp directory with command line and type
git pull origin master
so after changing boost version to 1.65.0 and updating websocketpp finally it built succesfully.

Related

Can't install libraries on Visual Studio code

I downloaded vcpkg, i managed to run the commands but whenever i try to install a library, the following error comes up :Error: while loading iostream:
The port directory (D:\New folder (2)\DEV\vcpkg\ports\iostream) does not exist
Error: failed to load port from D:\New folder (2)\DEV\vcpkg\ports\iostream
Note: Updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.
i tried updating vcpkg but it didnt work. I just started programming in c++ and i cant find a way to install libraries or whatever they are called . Is there any other way to install iostream and stuff like that?
sorry if this is a stupid question but im new and i didnt find anything that could have helped me.

VisualStudio: remote lib headers are not downloaded when working with Suse Enterprise Server 12 SP5

Problem
I've got an issue when developing c++ application in Visual Studio using Suse Enterprise Server 12 SP5 distribution as remote build machine. The main problem is caused by libxml2.
Error logs: Errors.img
In the beginning, Visual Studio notified me that it cannot find libxml. I checked directory containing those headers and found out that libxml wasn't downloaded when I tried to load remote headers.
Research
Before SLES, I was working with CentOS without problems. As I understand, Visual Studio loads headers from /usr/lib/, so I compared how those distributions store installed libs. I found out that in CentOS lib files are stored in "/usr/lib" directory, but SLES keep them mostly stored in "/lib or /lib64" directories. So, I downloaded libxml sources from https://gitlab.gnome.org/GNOME/libxml2/ .
NOTE: VS failed when tried to execute "make" command, so I tried just coping “include/libxml” folder from sources to “/usr/lib/ directory”.
After it, Visual Studio downloaded that lib and intellisence has stopped showing error: "Cannot find libxml". But I still get errors of libxml absence: Other errors.img
My question is what are ways to solve this problem? Maybe there exists any way to download /lib/ directory, or install this libxml to /usr/lib at start? Do libxml from CentOS will correctly work in SLES?
Thank you in advance!
After some tries, solution founded.
I installed openSuse instead of SLES, download all necessary libs and successfully get headers. By the way, c++ application which built on openSuse, could launch on SLES without any problem.

Cmake doesn't find boost windows

I'm trying to run this code:
https://github.com/snukky/news-translit-nmt
I've installed boost and got the following messages:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\Program Files\boost\boost_1_67_0
The following directory should be added to linker library paths:
C:\Program Files\boost\boost_1_67_0\stage\lib
By the comment of #kenba I've added the following environment variables:
Try 1
When I try to run the following cmd:
cmake .. -DCMAKE_BUILD_TYPE=Release
I get:
-- Could NOT find Boost (missing: timer iostreams filesystem system chrono) (found version "1.67.0")
CMake Error at CMakeLists.txt:290 (message):
Cannot find Boost libraries. Terminating.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!
See also "D:/ThesisResources/previous_works/news-translit-nmt-master/tools/marian-dev/build/CMakeFiles/CMakeOutput.log".
Try 2
When I try to give a custom boost by this ref
https://marian-nmt.github.io/docs/#custom-boost:
I run the following cmd:
cmake .. -DBOOST_ROOT="C:\Program Files\boost\boost_1_67_0"
I get the same error.
I've also tried working with Linux WSL (But problems with CUDA installation overthere, their team is working on it), Linux VirtualBox (Not enough resources), and Ubuntu 17.10 I have installed (But Cuda requires Ubuntu 16.04 / 18.04)
What am I missing here? I'm trying any suggestion, stuck on it for a few days. Thanks!
Edit:
I reinstalled Ubuntu 16.04 and the problem was solved. Still don't know how to solve it in windows, but i'll continue use Ubuntu 16.04.
I had this problem earlier while trying to build the Windows version of Marian NMT (the same component that you're having trouble with). I can't remember the exact steps to solve the problem, but the root cause is that the Marian NMT build for Windows does not work with newer versions of Boost, since the source code uses some deprecated calling conventions for timer and chrono libraries (maybe some others as well).
The error message kind of confirms this: it can't find Boost, but on the other hand it says it finds your version 1.67.0. The solution is to use an older version of boost, I've confirmed that it works with 1.60.0.
If you just require a Marian NMT decoder that works in Windows, a project I work on has released a plugin for the Trados Studio translation tool, which contains a compiled marian-decoder executable for Windows: https://object.pouta.csc.fi/fiskmo/TradosStudio/FiskmoTranslationProvider.sdlplugin. You can access the executable by unzipping the sdlplugin file, the StartMtPipe.bat shows how to use the decoder.

build opencv with extra modules error ocv_download

I try to build openCV with Extramodules. If I try to configure the projectfiles (vc14 x32 on windows 10) with cmake there's the error:
CMake Error at opencv_contrib-master/modules/xfeatures2d/cmake/download_vgg.cmake:13 (ocv_download):
Unknown CMake command "ocv_download".
Did anyone ever have this problem and knows how to solve it?
The simple answer is you are using incompatible versions of opencv and opencv_contrib, you might be installing current version of opencv_contrib on maybe opencv2.4.xx
Well, the download link for opencv contrib in CMake script https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d now is 400: Invalid request.
From the commit https://github.com/opencv/opencv_contrib/commit/593e78c5d084aa0a29eb1e0459fc7f7a4dd52ea8 you can try to ignore the added line in CMakeLists include(cmake/download_vgg.cmake) and rebuild.
The below is basing on my experience, I'm not sure it will works for OpenCV 3.0.
Maybe you can try to clone opencv contrib from git, then copy it to somewhere (for example modules directory in opencv source code). Then use CMAKE to set OPENCV_EXTRA_MODULES_PATH. If the hash is correct then it won't download and use the offline package.
I have try and build success OpenCV 2.x with IPP.
Hope it help.
Just follow instructions here.
Make sure you have active internet connection while building Opencv with contrib module.
When you hit config button on cmake(gui), it downloads other files like
vgg_generated_...
boostdesc_binboost_...
boostdesc_lbgm.i
P.S: i compiled Opencv 3.1 with contrib. Cmake downloaded required files & configure was Done.

Error occurred when building NaoQI C++ SDK example project helloworld on Windows VS2010

I'm trying to install NaoQI C++ SDK on Windows following the instructions in http://doc.aldebaran.com/2-1/dev/cpp/install_guide.html.
I got stuck in Part E. Step.3, when running qibuild make. At first, it gave error messages similar to this question: https://community.aldebaran.com/en/forum/error-occurred-when-building-prodect-hellworld-1176.
After I added add_definitions("-DNOMINMAX") to CmakeLists.txt as suggested, the error message becomes:
LINK : fatal error LNK1104: cannot open file 'c:\NaoQi\Devtool\naoqi-sdk\lib\boost_signals-vc100-mt-gd-1_50.lib'
I cannot find any file called boost_signals-vc100-mt-gd-1_50.lib in naoqi sdk. I guess it should be compiled automatically when running qibuild configure or qibuild make but somehow it didn't.
The SDK version is naoqi-sdk-2.0.2.53-win32-vs2010, and OS is Windows 8.1(x64).
With Visual Studio 2010, CMake 2.8.10, qibuild 3.6.2 and Python 2.7.8.
I don't know if it makes any difference, but when running "qibuild configure", I'm getting following messages:
— Looking for include file pthread.h
— Looking for include file pthread.h – not found
I checked PTHREAD_INCLUDE_DIRS which is c:/NaoQi/Devtool/naoqi-sdk/include and pthread.h is under this path.
Solved it!
If anybody wants to know, here is how I solve it.
Compile your own boost library and copy them into naoqi-sdk/lib.
Open the VisualStudio solution file and change the configuration to release mode.
The Windows version SDK doesn't have debug version ALCOMMON, ALPROXY and ALVALUE libraries. That's why the debug mode doesn't work.