- Install boost, see Boost setup section.
- Use
git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git
to clone your local repo. - Run
cmake -DBOOST_ROOT:STRING=<your boost install folder> -DBOOST_VER:STRING=<your boost version> ./
- Run
make install
(if makefile generated) or open generated project (if project file generated) to build. - Outputs is under
./build
, link with the all static libs under./build/lib
and include headers under./build/include
in your client code where you want to use it.
- If you're using boost without install,you can specify
boost include dir
andboost lib dir
separately by:
cmake
-DBOOST_INCLUDEDIR=<your boost include folder>
-DBOOST_LIBRARYDIR=<your boost lib folder>
-DBOOST_VER:STRING=<your boost version>
./
- CMake didn't allow merging static libraries,but they're all copied to
./build/lib
, you can DIY if you like.
- Install boost, see Boost setup section.
- Use
git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git
to clone your local repo. - Add
<your boost install folder>/include
,./lib/websocketpp
and./lib/rapidjson/include
to headers search path. - Include all files under
./src
in your project, addsio_client.cpp
,sio_socket.cpp
,internal/sio_client_impl.cpp
,internal/sio_packet.cpp
to source list. - Add
<your boost install folder>/lib
to library search path, addboost.lib
(Win32) or-lboost
(Other) link option. - Include
sio_client.h
in your client code where you want to use it.
- Download boost from boost.org.
- Unpack boost to some place.
- Run either .\bootstrap.bat (on Windows), or ./bootstrap.sh (on other operating systems) under boost folder.
Windows (or other mainstream desktop platforms shall work too):
The following script will build the necessary subset:
bjam install --prefix="<your boost install folder>" --with-system --with-date_time --with-random link=static runtime-link=shared threading=multi
Optionally You can merge all output .lib files into a fat one, especially if you're not using cmake.
In output folder, run:
lib.exe /OUT:boost.lib *