mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-31 16:04:22 +02:00
Merge pull request #83 from redboltz/fixed_readme
Fixed https://github.com/msgpack/msgpack-c/issues/82
This commit is contained in:
commit
6e5fc6d396
@ -94,15 +94,17 @@ You can build using command line as follows:
|
|||||||
|
|
||||||
Include `msgpack.hpp` (or `msgpack.h` for C) in your application and link with libmsgpack. Here is a typical gcc link command:
|
Include `msgpack.hpp` (or `msgpack.h` for C) in your application and link with libmsgpack. Here is a typical gcc link command:
|
||||||
|
|
||||||
gcc -lmsgpack myapp.c -o myapp
|
g++ myapp.cpp -lmsgpack -o myapp
|
||||||
|
|
||||||
|
|
||||||
### Code Example
|
### Code Example
|
||||||
```CPP
|
```CPP
|
||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
int main(void) {
|
int main() {
|
||||||
// This is target object.
|
// This is target object.
|
||||||
std::vector<std::string> target;
|
std::vector<std::string> target;
|
||||||
target.push_back("Hello,");
|
target.push_back("Hello,");
|
||||||
|
@ -22,7 +22,7 @@ as comparing that implementations.
|
|||||||
or
|
or
|
||||||
$ port install msgpack # MacPorts
|
$ port install msgpack # MacPorts
|
||||||
|
|
||||||
$ g++ -Wall -lmsgpack crosslang.cc -o crosslang
|
$ g++ -Wall crosslang.cc -lmsgpack -o crosslang
|
||||||
|
|
||||||
$ ./crosslang
|
$ ./crosslang
|
||||||
Usage: ./crosslang [in-file] [out-file]
|
Usage: ./crosslang [in-file] [out-file]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// or
|
// or
|
||||||
// $ port install msgpack # MacPorts
|
// $ port install msgpack # MacPorts
|
||||||
//
|
//
|
||||||
// $ g++ -Wall -lmsgpack crosslang.cc
|
// $ g++ -Wall crosslang.cc -lmsgpack
|
||||||
//
|
//
|
||||||
#include <msgpack.hpp>
|
#include <msgpack.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user