mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
Fixed ``pre`` markdown.
+43
-13
@@ -4,19 +4,24 @@ This documentation focuses on C++11 and C++03.
|
||||
|
||||
## How to use
|
||||
|
||||
``` git clone https://github.com/msgpack/msgpack-c.git cd msgpack-c
|
||||
```
|
||||
git clone https://github.com/msgpack/msgpack-c.git cd msgpack-c
|
||||
```
|
||||
|
||||
Add msgpack-c/include as an include path for your project.
|
||||
|
||||
``` g++ -Ipath_to_msgpack-c/include your_program.cpp ```
|
||||
```
|
||||
g++ -Ipath_to_msgpack-c/include your_program.cpp
|
||||
```
|
||||
|
||||
## C++11 support
|
||||
|
||||
When you set the C++11 or later compiler option, msgpack-c enables
|
||||
C++11 functionalities.
|
||||
|
||||
``` g++ -std=c++11 -Ipath_to_msgpack-c/include your_program.cpp ```
|
||||
```
|
||||
g++ -std=c++11 -Ipath_to_msgpack-c/include your_program.cpp
|
||||
```
|
||||
|
||||
## Test and Install
|
||||
|
||||
@@ -24,39 +29,64 @@ C++11 functionalities.
|
||||
|
||||
#### Configure
|
||||
|
||||
``` cd msgpack-c ./bootstrap ./congigure ```
|
||||
```
|
||||
cd msgpack-c ./bootstrap ./congigure
|
||||
```
|
||||
|
||||
If you want to test C++11 support, execute
|
||||
|
||||
``` ./congigure CXXFLAGS="-std=c++11" ```
|
||||
```
|
||||
./congigure CXXFLAGS="-std=c++11"
|
||||
```
|
||||
|
||||
|
||||
#### Build libraries for C.
|
||||
|
||||
``` make ```
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
#### Build and execute tests.
|
||||
|
||||
``` make check ```
|
||||
```
|
||||
make check
|
||||
```
|
||||
|
||||
#### Install
|
||||
|
||||
``` sudo make install ```
|
||||
```
|
||||
sudo make install
|
||||
```
|
||||
|
||||
### Using cmake # Configure ``` cmake . ``` If you want to test C++11
|
||||
###support, execute ``` cmake -DMSGPACK_CXX11=ON . ```
|
||||
### Using cmake
|
||||
|
||||
#### Configure
|
||||
```
|
||||
cmake .
|
||||
```
|
||||
|
||||
If you want to test C++11 support, execute
|
||||
```
|
||||
cmake -DMSGPACK_CXX11=ON .
|
||||
```
|
||||
|
||||
#### Build libraries for C and tests.
|
||||
|
||||
``` make ```
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
#### Execute tests.
|
||||
|
||||
``` make test ```
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
#### Install
|
||||
|
||||
``` sudo make install ```
|
||||
```
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## Users guide
|
||||
|
||||
|
||||
Reference in New Issue
Block a user