Last active
March 7, 2018 20:48
-
-
Save djungelorm/f19163ee8c68c16f9e4f253a3b464ece to your computer and use it in GitHub Desktop.
kRPC C++ client with CodeBlocks and MSYS2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download and install MSYS2 64bit (http://www.msys2.org/), follow the installation instructions and update it (say yes if asked to remove conflicting packages) | |
Open MSYS2 and run the following command to install required packages: | |
pacman -S base-devel unzip mingw-w64-x86_64-gcc mingw-w64-x86_64-binutils | |
Download the following files to C:/msys64/home/<your username> | |
* protobuf-cpp-3.4.1.zip from https://github.com/google/protobuf/releases | |
* asio-1.10.6.zip from https://sourceforge.net/projects/asio/files/asio/1.10.6%20%28Stable%29/ | |
* krpc-cpp-0.4.4.post1.zip from https://github.com/krpc/krpc/releases/tag/v0.4.4.post1.cpp | |
Run the following commands in MSYS2, to extract and compile the libraries: | |
export PATH=$PATH:/mingw64/bin | |
unzip protobuf-cpp-3.4.1.zip | |
cd protobuf-3.4.1 | |
./configure | |
make | |
make install | |
unzip asio.1.10.6.zip | |
cd asio-1.10.6 | |
./configure --without-boost | |
make -C include install | |
unzip krpc-0.4.4.post1.zip | |
cd krpc-0.4.4 | |
CPPFLAGS="-I/usr/local" ./configure | |
make | |
To use these libraries in codeblocks, you will need to configure it to use the compiler toolchain in C:/msys2/mingw64/bin/ | |
Set the include and linker paths for the project to C:/msys2/usr/include and C:/msys2/usr/lib | |
The linker also needs to be configured to link the following libraries: | |
krpc | |
protobuf | |
ws2_32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment