@ -13,7 +13,7 @@ A C++ library for creating Monero applications using native bindings to [monero
* [Sample code](#sample-code)
* [Documentation](#documentation)
* [Using this library in your project](#using-this-library-in-your-project)
* [Using monero-cpp in your project](#using-monero-cpp-in-your-project)
* [Related projects](#related-projects)
* [License](#license)
* [Donations](#donations)
@ -162,56 +162,62 @@ delete wallet_random;
* [API and model overview with visual diagrams](https://moneroecosystem.org/monero-java/monero-spec.pdf)
* [monero-ts documentation](https://github.com/monero-ecosystem/monero-ts#documentation) provides additional documentation which translates to monero-cpp
## Using this library in your project
## Using monero-cpp in your project
This project may be compiled as part of another application or built as a shared or static library.
For example, [monero-java](https://github.com/monero-ecosystem/monero-java) compiles this project to a shared library to support Java JNI bindings, while [monero-ts](https://github.com/monero-ecosystem/monero-ts) compiles this project to WebAssembly binaries.
### Building monero-cpp on Mac & Linux
1. If building this library standalone instead of as a submodule in another project, clone the project repository and update its submodules:
4. Follow instructions to install [unbound](https://unbound.docs.nlnetlabs.nl/en/latest/getting-started/installation.html) for Linux to your home directory (e.g. `~/unbound-1.19.0`).
5. Build monero-project, located as a submodule at ./external/monero-project. Install [dependencies](https://github.com/monero-project/monero#dependencies) as needed for your system, then build with: `make release-static -j8`
6. Link to this library's source files in your application, or build monero-cpp to a shared library in ./build: `./bin/build_libmonero_cpp.sh`
### macOS
1. Clone the project repository if applicable: `git clone --recurse-submodules https://github.com/monero-ecosystem/monero-cpp.git`
3. Follow instructions to install [unbound](https://unbound.docs.nlnetlabs.nl/en/latest/getting-started/installation.html) for macOS to your home directory (e.g. `~/unbound-1.19.0`).
4. Build monero-project, located as a submodule at ./external/monero-project. Install [dependencies](https://github.com/monero-project/monero#dependencies) as needed for your system, then build with: `make release-static -j8`
5. Link to this library's source files in your application, or build monero-cpp to a shared library in ./build: `./bin/build_libmonero_cpp.sh`
### Windows
1. Download and install [MSYS2](https://www.msys2.org/).
2. Press the Windows button and launch `MSYS2 MINGW64` for 64 bit systems or `MSYS2 MINGW32` for 32 bit.
@ -230,14 +236,13 @@ For example, [monero-java](https://github.com/monero-ecosystem/monero-java) comp
5. Clone repo if installing standalone (skip if building as part of another repo like monero-java or monero-ts): `git clone --recursive https://github.com/monero-ecosystem/monero-cpp.git`
7. Build monero-project, located as a submodule at ./external/monero-project. Install [dependencies](https://github.com/monero-project/monero#dependencies) as needed for your system, then build with:
For 64 bit: `make release-static-win64`
For 32 bit: `make release-static-win32`
10. Build as a shared library to ./build/: `cd ../../ && ./bin/build_libmonero_cpp.sh`
8. Link to this library's source files in your application, or build monero-cpp to a shared library (libmonero-cpp.dll) in ./build: `./bin/build_libmonero_cpp.sh`