D++ (DPP)
C++ Discord API Bot Library
Building on Linux

Building on Linux

Note
You might not need to build a copy of the library for Linux - precompiled deb files for 64 bit and 32 bit Debian and Ubuntu are provided in the github version releases. Unless you are on a different Linux distribution which cannot install deb files, or wish to submit fixes and enhancements to the library itself you may have an easier time installing the precompiled version instead.

1. Build Source Code

mkdir build
cd build
cmake ..
make -j8

Replace the number after -j with a number suitable for your setup, usually the same as the number of cores on your machine. cmake will fetch any dependencies that are required for you and ensure they are compiled alongside the library.

2. Optional: Run test cases

run ./test for unit test cases. You will need to create a config.json file in the directory above the executable file with a valid bot token in it. See the example file config.example.json for an example of the correct format.

3. Install to /usr/local/include and /usr/local/lib

sudo make install

4. Installation to a different directory

If you want to install the library, its dependencies and header files to a different directory, specify this directory when running cmake:

cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install

Then once the build is complete, run make install to install to the location you specified.

5. Using the library

Once installed to the /usr/local directory, you can make use of the library in standalone programs simply by including it and linking to it:

g++ -std=c++17 mydppbot.cpp -o dppbot -ldpp

The important flags in this command-line are:

  • -std=c++17 - Required to compile the headers
    • mydppbot.cpp - Your source code
  • dppbot - The name of the executable to make

Of course, this is just a proof of concept - you should really use a more robust build system like GNU make or `cmake`.

Have fun!

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0