Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MelloIocus/3faa1f504270f2266214b58a1642039f to your computer and use it in GitHub Desktop.
Save MelloIocus/3faa1f504270f2266214b58a1642039f to your computer and use it in GitHub Desktop.
Installation instructions for the C++ ecosystem

Installation instructions for the C++ ecosystem

This document contains installation instructions for tools and libraries for the programming language C++. It uses the cross-platform build system CMake whenever the software to download, configure, build and run supports it.

When building with multiple compilers for multiple architectures, the following naming scheme is used, since the build description has to consist of the following four aspects to be unique:

  1. The compiler used.
  2. The version of the compiler used.
  3. The configuration (build type) of the software to build (normally Release).
  4. The architecture of the software built (e.g. x64, x86).

Combined with the three compilters MinGW-w64 6.30, MSVC 14.0 and Clang 3.9.1, the following *TODO build types (configurations) are possible (if using CMake without custom build types).

TODO(wolters): Consider modification of shadow build directories. Think about using clang-3.9.1-x64-release, gcc-3.9.1-x64-release and msvc-14.0-x64-release, instead of the below.

Alternative 1:

|---build-zeromq-4.2.0
    |---clang391-x64-debug
    |---clang391-x64-minsizerel
    |---clang391-x64-release
    |---clang391-x64-relwithdebinfo
    |---clang391-x86-debug
    |---clang391-x86-minsizerel
    |---clang391-x86-release
    |---clang391-x86-relwithdebinfo
    |---mgw63-x64-debug
    |---mgw63-x64-minsizerel
    |---mgw63-x64-release
    |---mgw63-x64-relwithdebinfo
    |---mgw63-x86-debug
    |---mgw63-x86-minsizerel
    |---mgw63-x86-release
    |---mgw63-x86-relwithdebinfo
    |---vc140-x64-debug
    |---vc140-x64-minsizerel
    |---vc140-x64-release
    |---vc140-x64-relwithdebinfo
    |---vc140-x86-debug
    |---vc140-x86-minsizerel
    |---vc140-x86-release
    |---vc140-x86-relwithdebinfo

Alternative 2:

|---build-zeromq-4.2.0
    |---x64
        |---clang391
            |---Debug
            |---MinSizeRel
            |---Release
            |---RelWithDebInfo
        |---mgw63
            |---Debug
            |---MinSizeRel
            |---Release
            |---RelWithDebInfo
        |---vc140
            |---Debug
            |---MinSizeRel
            |---Release
            |---RelWithDebInfo
    |---x86
        |---clang391
            |---Debug
            |---MinSizeRel
            |---Release
            |---RelWithDebInfo
        |---mgw63
            |---Debug
            |---MinSizeRel
            |---Release
            |---RelWithDebInfo
        |---vc140
            |---Debug
            |---MinSizeRel
            |---Release
            |---RelWithDebInfo

Table of Contents

Library

Compression

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri http://zlib.net/zlib-1.2.11.tar.gz -OutFile zlib-1.2.11.tar.gz"
tar -xf zlib-1.2.11.tar.gz
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzlib-1.2.11 -Bbuild-zlib-1.2.11/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x86
cmake --build build-zlib-1.2.11/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzlib-1.2.11 -Bbuild-zlib-1.2.11/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x86
cmake --build build-zlib-1.2.11/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzlib-1.2.11 -Bbuild-zlib-1.2.11/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64
cmake --build build-zlib-1.2.11/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzlib-1.2.11 -Bbuild-zlib-1.2.11/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64
cmake --build build-zlib-1.2.11/x64/mgw63/Release --config Release --target install

Cryptography

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/weidai11/cryptopp/archive/CRYPTOPP_5_6_5.zip -OutFile cryptopp-CRYPTOPP_5_6_5.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive cryptopp-CRYPTOPP_5_6_5.zip -Dest ."

TODO(wolters): When building for x64 (64-bit) the cryptest.exe is not generated if Ninja is used as the generator.

MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x86
cmake --build build-cryptopp-5.6.5/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x86
cmake --build build-cryptopp-5.6.5/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - MinGW Makefiles" -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x64
cmake --build build-cryptopp-5.6.5/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - MinGW Makefiles" -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x64
cmake --build build-cryptopp-5.6.5/x64/mgw63/Release --config Release --target install

TODO(wolters): Update section.

*-nix
wget https://github.com/jedisct1/libsodium/archive/1.0.11.zip
unzip libsodium-1.0.11.zip
cd libsodium-1.0.11
./autogen.sh
./configure --prefix=/opt/libsodium/libsodium-1.0.11
make && make check
sudo make install
sudo ln -snf /opt/libsodium/libsodium-1.0.11 /opt/libsodium/default

The installation of Sodium can be tested by creating the following C++ program (file hello_sodium.cc):

#include <iostream>

#include <sodium.h>

int main() {
  if (sodium_init() == -1) {
    return 1;
  }

  std::cout << "hello, sodium\n";
}

Execute the following to compile, link and run the program:

g++ -o hello_sodium hello_sodium.cc -lsodium
./hello_sodium

The following should be printed to the standard output:

hello, world

General-Purpose

TODO(wolters): Find solution to avoid the hack cxxflags=-D_hypot=hypot install when building with MinGW-w64.

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri http://downloads.sf.net/project/boost/boost/1.63.0/boost_1_63_0.zip -OutFile boost_1_63_0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive boost_1_63_0.zip -Dest ."
MSVC 14.0 x64 + x86
REM Open a MSVC 64-bit command prompt.
PUSHD boost_1_63_0
bootstrap
b2 -j%NUMBER_OF_PROCESSORS% --build-type=complete --build-dir=../boost_1_63_0-build/x86/vc14 --layout=versioned toolset=msvc-14.0 address-model=32 architecture=x86 install --prefix=../../native/boost/boost-1.63.0-x86
b2 -j%NUMBER_OF_PROCESSORS% --build-type=complete --build-dir=../boost_1_63_0-build/x64/vc14 --layout=versioned toolset=msvc-14.0 address-model=64 architecture=x86 install --prefix=../../native/boost/boost-1.63.0-x64
POPD
MinGW-w64 (GCC 6.3.0) x64 + x86
REM Open a MinGW-w64 command prompt.
PUSHD boost_1_63_0
bootstrap
b2 -j%NUMBER_OF_PROCESSORS% --build-type=complete --build-dir=../boost_1_63_0-build/x86/mgw63 --layout=versioned toolset=gcc address-model=32 architecture=x86 cxxflags=-D_hypot=hypot install --prefix=../../native/boost/boost-1.63.0-x86
b2 -j%NUMBER_OF_PROCESSORS% --build-type=complete --build-dir=../boost_1_63_0-build/x64/mgw63 --layout=versioned toolset=gcc address-model=64 architecture=x86 cxxflags=-D_hypot=hypot install --prefix=../../native/boost/boost-1.63.0-x64
POPD
*-nix
wget http://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.zip
unzip boost_1_63_0.zip
cd boost_1_63_0
./bootstrap.sh --with-toolset=gcc --prefix=/opt/boost/boost-1.63.0
sudo ./b2 -j3 --build-dir=boost-1.63.0-build --build-type=complete toolset=gcc cxxflags=-std=c++11 install
sudo ln -snf /opt/boost/boost-1.63.0 /opt/boost/default

Graphical User Interface

wget http://download.qt.io/official_releases/qt/5.7/5.7.1/qt-opensource-linux-x64-5.7.1.run
chmod +x qt-opensource-linux-x64-5.7.1.run
./qt-opensource-linux-x64-5.7.1.run

Enter the following in the "Installation Folder" dialog:

/opt/qt/qt-5.7.1

Select the "Select All" button in the "Select Components" dialog. Deselect the items "Sources" and "Qt Script (Deprecated)" below "Qt 5.7" and deselect the item "Tools".

sudo ln -snf /opt/qt/qt-5.7.1 /opt/qt/default

Inter-Process Communication (IPC)

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/zeromq/libzmq/releases/download/v4.2.0/zeromq-4.2.0.zip -OutFile zeromq-4.2.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive zeromq-4.2.0.zip -Dest ."
REM Renaming the source directory to "libzmq" is mandatory to ensure referenced paths in other builds are set correctly.
MOVE zeromq-4.2.0 libzmq
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - NMake Makefiles" -Hlibzmq -Bbuild-zeromq-4.2.0/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x86
REM TODO(wolters): Building with CMake does not work with ZeroMQ 4.2.0. The following command is used to build the documentation only.
cmake --build build-zeromq-4.2.0/x86/vc140/Release --config Release --target install
PUSHD libzmq\builds\msvc\build
CALL build
POPD
XCOPY /I /Q /Y build-zeromq-4.2.0\x86\vc140\Release\doc ..\native\zeromq\zeromq-4.2.0-x86\doc\zmq
XCOPY /I /Q /Y libzmq\include ..\native\zeromq\zeromq-4.2.0-x86\include
XCOPY /I /Q /Y libzmq\bin\Win32\Release\v140\dynamic\*.exe ..\native\zeromq\zeromq-4.2.0-x86\bin
XCOPY /I /Q /Y libzmq\bin\Win32\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x86\bin
XCOPY /Q /Y libzmq\bin\Win32\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\Win32\Release\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\Win32\Release\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-s-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\Win32\Debug\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-gd-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\Win32\Debug\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-gd-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\Win32\Debug\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-sgd-4_2_0.lib*
XCOPY /Q /Y libzmq\AUTHORS ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\AUTHORS*.txt
XCOPY /I /Q /Y libzmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x86\share\zmq
MOVE /Y ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\COPYING.LESSER.txt
XCOPY /Q /Y libzmq\COPYING ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\COPYING*.txt
XCOPY /Q /Y libzmq\NEWS ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\NEWS*.txt
REM Copy libraries to simplify build of zmqpp.
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\zmq.lib*
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-s-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\zmq-static.lib*
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hlibzmq -Bbuild-zeromq-4.2.0/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x86
cmake --build build-zeromq-4.2.0/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - NMake Makefiles" -Hlibzmq -Bbuild-zeromq-4.2.0/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x64
REM TODO(wolters): Building with CMake does not work with ZeroMQ 4.2.0. The following command is used to build the documentation only.
cmake --build build-zeromq-4.2.0/x64/vc140/Release --config Release --target install
PUSHD libzmq\builds\msvc\build
CALL build
POPD
XCOPY /I /Q /Y build-zeromq-4.2.0\x64\vc140\Release\doc ..\native\zeromq\zeromq-4.2.0-x64\doc\zmq
XCOPY /I /Q /Y libzmq\include ..\native\zeromq\zeromq-4.2.0-x64\include
XCOPY /I /Q /Y libzmq\bin\x64\Release\v140\dynamic\*.exe ..\native\zeromq\zeromq-4.2.0-x64\bin
XCOPY /I /Q /Y libzmq\bin\x64\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x64\bin
XCOPY /Q /Y libzmq\bin\x64\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\x64\Release\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\x64\Release\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-s-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\x64\Debug\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-gd-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\x64\Debug\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-gd-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\x64\Debug\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-sgd-4_2_0.lib*
XCOPY /Q /Y libzmq\AUTHORS ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\AUTHORS*.txt
XCOPY /I /Q /Y libzmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x64\share\zmq
MOVE /Y ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\COPYING.LESSER.txt
XCOPY /Q /Y libzmq\COPYING ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\COPYING*.txt
XCOPY /Q /Y libzmq\NEWS ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\NEWS*.txt
REM Copy libraries to simplify build of zmqpp.
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\zmq.lib*
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-s-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\zmq-static.lib*
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hlibzmq -Bbuild-zeromq-4.2.0/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x64
cmake --build build-zeromq-4.2.0/x64/mgw63/Release --config Release --target install
Microsoft Windows

TODO(wolters): The CMakeLists.txt does not when building with Microsoft Windows Add the following:

if(WIN32)
  target_link_libraries(zmqpp wsock32 ws2_32)
endif()

if(WIN32)
  target_link_libraries(zmqpp-static wsock32 ws2_32)
endif()

Also, wrap the CMAKE_CXX_FLAGS modifications into a if statement.

if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) # ... endif()

powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/zeromq/zmqpp/archive/4.1.2.zip -OutFile zmqpp-4.1.2.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive zmqpp-4.1.2.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x86 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x86 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x64 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x64 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x64/mgw63/Release --config Release --target install

Reflection

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/billyquith/ponder/archive/1.3.0.zip -OutFile ponder-1.3.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive ponder-1.3.0.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x86
cmake --build build-ponder-1.3.0/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x86
cmake --build build-ponder-1.3.0/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x64
cmake --build build-ponder-1.3.0/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x64
cmake --build build-ponder-1.3.0/x64/mgw63/Release --config Release --target install
Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri http://rttr.org/releases/rttr-0.9.5-src.zip -OutFile rttr-0.9.5-src.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive rttr-0.9.5-src.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x86
cmake --build build-rttr-0.9.5/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x86
cmake --build build-rttr-0.9.5/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x64
cmake --build build-rttr-0.9.5/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x64
cmake --build build-rttr-0.9.5/x64/mgw63/Release --config Release --target install

Serialization

Cereal is a header-only library.

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/USCiLab/cereal/archive/v1.2.1.zip -OutFile cereal-1.2.1"
powershell -NoLogo -NoProfile -Command "Expand-Archive cereal-1.2.1 -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x86
cmake --build build-cereal-1.2.1/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x86
cmake --build build-cereal-1.2.1/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x64
cmake --build build-cereal-1.2.1/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x64
cmake --build build-cereal-1.2.1/x64/mgw63/Release --config Release --target install
Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/google/protobuf/releases/download/v3.1.0/protobuf-cpp-3.1.0.zip -OutFile protobuf-cpp-3.1.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive protobuf-cpp-3.1.0.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hprotobuf-3.1.0/cmake -Bbuild-protobuf-3.1.0/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.1.0-x86
cmake --build build-protobuf-3.1.0/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hprotobuf-3.1.0/cmake -Bbuild-protobuf-3.1.0/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.1.0-x86 -DZLIB_ROOT=%ZLIB_ROOT%
cmake --build build-protobuf-3.1.0/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hprotobuf-3.1.0/cmake -Bbuild-protobuf-3.1.0/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.1.0-x64
cmake --build build-protobuf-3.1.0/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hprotobuf-3.1.0/cmake -Bbuild-protobuf-3.1.0/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.1.0-x64 -DZLIB_ROOT=%ZLIB_ROOT%
cmake --build build-protobuf-3.1.0/x64/mgw63/Release --config Release --target install
Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/jbeder/yaml-cpp/archive/release-0.5.3.zip -OutFile yaml-cpp-yaml-cpp-0.5.3.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive yaml-cpp-yaml-cpp-0.5.3.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-0.5.3/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x86
cmake --build build-yaml-cpp-0.5.3/x86/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-0.5.3/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x86
cmake --build build-yaml-cpp-0.5.3/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-yaml-cpp-0.5.3/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x64
cmake --build build-yaml-cpp-yaml-cpp-0.5.3/x64/vc140/Release --config Release --target install
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-yaml-cpp-0.5.3/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x64
cmake --build build-yaml-cpp-yaml-cpp-0.5.3/x64/mgw63/Release --config Release --target install

Markup Language

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/sevenjay/cpp-markdown/archive/master.zip -OutFile cpp-markdown-master.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive cpp-markdown-master.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x86/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x86
cmake --build build-cpp-markdown-head/x86/vc140/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.lib  ../native/cpp-markdown/cpp-markdown-head-x86/lib
MinGW-w64 (GCC 6.3.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x86
cmake --build build-cpp-markdown-head/x86/mgw63/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.a  ../native/cpp-markdown/cpp-markdown-head-x86/lib
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x64/vc140/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x64
cmake --build build-cpp-markdown-head/x64/vc140/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.lib  ../native/cpp-markdown/cpp-markdown-head-x86/lib
MinGW-w64 (GCC 6.3.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x64
cmake --build build-cpp-markdown-head/x64/mgw63/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.a  ../native/cpp-markdown/cpp-markdown-head-x86/lib

Test

Unit Testing

Microsoft Windows
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/google/googletest/archive/release-1.8.0.zip -OutFile googletest-release-1.8.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive googletest-release-1.8.0.zip -Dest ."
MSVC 14.0 x86
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x86/vc14/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x86 -Dgtest_disable_pthreads=ON
cmake --build build-gtest-1.8.0/x86/vc14/Release --config Release --target install
MinGW-w64 (GCC 6.2.0) x86
REM Open a MinGW-w64 32-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x86/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x86 -Dgtest_disable_pthreads=ON
cmake --build build-gtest-1.8.0/x86/mgw63/Release --config Release --target install
MSVC 14.0 x64
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x64/vc14/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64 -Dgtest_disable_pthreads=ON
cmake --build build-gtest-1.8.0/x64/vc14/Release --config Release --target install
MinGW-w64 (GCC 6.2.0) x64
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - Ninja" -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x64/mgw63/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64 -Dgtest_disable_pthreads=ON
cmake --build build-gtest-1.8.0/x64/mgw63/Release --config Release --target install

Distributed Computing

su
wget http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO-6.3.1.tar.gz
tar -xf ACE+TAO-6.3.1.tar.gz
export ACE_ROOT=$PWD/ACE_wrappers
echo "#include <ace/config-linux.h>" > $ACE_ROOT/ace/config.h
echo "" >> $ACE_ROOT/ace/config.h
echo "INSTALL_PREFIX = /usr/local" > $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo "include \$(ACE_ROOT)/include/makeinclude/platform_linux.GNU" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
sudo make install -C $ACE_ROOT/ace
make -C $ACE_ROOT/apps/gperf
export TAO_ROOT=$ACE_ROOT/TAO
make install -C $TAO_ROOT

Build Tool

*-nix

Source
wget https://cmake.org/cmake/help/v3.7/CMake.qch
wget http://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
tar -xf cmake-3.7.2.tar.gz
cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/cmake/cmake-3.7.2 -Bcmake-3.7.2-build -Hcmake-3.7.2
cmake --build cmake-3.7.2-build --target install
sudo mv CMake.qch /opt/cmake/cmake-3.7.2/doc
sudo ln -snf /opt/cmake/cmake-3.7.2 /opt/cmake/default
Binary
wget https://cmake.org/cmake/help/v3.7/CMake.qch
wget http:/cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh
sh cmake-3.7.2-Linux-x86_64.sh
sudo mkdir /opt/cmake
sudo mv cmake-3.7.2-Linux-x86_64 /opt/cmake/cmake-3.7.2
sudo mv CMake.qch /opt/cmake/cmake-3.7.2/doc
sudo ln -snf /opt/cmake/cmake-3.7.2 /opt/cmake/default

Documentation Generator

Source

wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz
tar -xf doxygen-1.8.13.src.tar.gz
cmake -G"Unix Makefiles" -Dbuild_doc=NO -Dbuild_wizard=YES -DCMAKE_INSTALL_PREFIX:PATH=/opt/doxygen/doxygen-1.8.13 -Bdoxygen-1.8.13-build -Hdoxygen-1.8.13
cmake --build doxygen-1.8.13-build --target install
sudo ln -snf /opt/doxygen/doxygen-1.8.13 /opt/doxygen/default

Binary

tar -xf doxygen-1.8.13.linux.bin.tar.gz
python -m compileall doxytag.py
mv doxytag.pyc doxygen-1.8.13/bin/doxytag
cd doxygen-1.8.13
./configure --prefix /opt/doxygen/doxygen-1.8.13
sudo make install
sudo ln -snf /opt/doxygen/doxygen-1.8.13 /opt/doxygen/default

Profiler / Memory Debugger

wget http://valgrind.org/downloads/valgrind-3.11.0.tar.bz2
tar -xf valgrind-3.11.0.tar.bz2
cd valgrind-3.11.0
sh ./configure --build x86_64-w64-linux-gnu
# If using "MinGW" with a "Microsoft Windows" OS:
#sh ./configure --build x86_64-w64-mingw32
make
make check

Code Coverage Tool

wget http://downloads.sf.net/ltp/lcov-1.12.tar.gz
tar -xf lcov-1.12.tar.gz
sudo make install -C lcov-1.12 PREFIX=/opt/lcov/lcov-1.12
sudo ln -snf /opt/lcov/lcov-1.12 /opt/lcov/default
# Automatic install with "Pip Installs Python (pip)":
pip install gcovr

# If installing into a custom location (e.g. ~/usr):
wget https://github.com/gcovr/gcovr/archive/3.3.zip
unzip gcovr-3.3.zip
mkdir -p /opt/gcovr/gcovr-3.3/bin
sudo cp gcovr-3.3/scripts/gcovr /opt/gcovr/gcovr-3.3/bin
sudo ln -snf /opt/gcovr/gcovr-3.3 /opt/gcovr/default

Static Code Analyzer

wget https://github.com/AlDanial/cloc/releases/download/v1.70/cloc-1.70.tar.gz
tar -xf cloc-1.70.tar.gz
sudo mkdir -p /opt/cloc/cloc-1.70/bin
sudo cp cloc-1.70/cloc /opt/cloc/cloc-1.70/bin
sudo ln -snf /opt/cloc/cloc-1.70 /opt/cloc/default
wget http://downloads.sf.net/project/cppcheck/cppcheck/1.75/cppcheck-1.75.zip
unzip cppcheck-1.75.tar.gz
sudo make install -C cppcheck-1.75 SRCDIR=build PREFIX=/opt/cppcheck/cppcheck-1.75 CFGDIR=/opt/cppcheck/cppcheck-1.75
sudo ln -snf /opt/cppcheck/cppcheck-1.75 /opt/cppcheck/default
tar -xf flawfinder-1.31.tar.gz
sudo make install -C flawfinder-1.31 prefix=/opt/flawfinder/flawfinder-1.31
sudo ln -snf /opt/flawfinder/flawfinder-1.31 /opt/flawfinder/default

iwyu requires Clang+LLVM.

wget http://include-what-you-use.org/downloads/include-what-you-use-0.6.src.tar.gz
tar -xf include-what-you-use-0.6.src.tar.gz
cmake -G"Unix Makefiles" -Binclude-what-you-use-0.6-build -Hinclude-what-you-use -DIWYU_LLVM_ROOT_PATH=/opt/clang+llvm/default -DCMAKE_INSTALL_PREFIX=/opt/include-what-you-use/include-what-you-use-0.6
sudo cmake --build include-what-you-use-0.6-build --target install
sudo cp include-what-you-use/iwyu_tool.py /opt/include-what-you-use/include-what-you-use-0.6/bin
sudo ln -snf /opt/include-what-you-use/include-what-you-use-0.6 /opt/include-what-you-use/default
sudo ln -nf /opt/include-what-you-use/default/bin/include-what-you-use /opt/clang+llvm/default/bin/include-what-you-use
sudo ln -nf /opt/include-what-you-use/default/bin/iwyu_tool.py /opt/clang+llvm/default/bin/iwyu_tool.py

Integrated Development Environment (IDE)

wget http://download.qt.io/official_releases/qtcreator/4.2/4.2.0/qt-creator-opensource-linux-x86_64-4.2.0.run
chmod +x  qt-creator-opensource-linux-x86_64-4.2.0.run
./ qt-creator-opensource-linux-x86_64-4.2.0.run

Enter the following in the "Installation Folder" dialog:

/opt/qt-creator/qt-creator-4.2.0

sudo ln -snf /opt/qt-creator/qt-creator-4.2.0 /opt/qt-creator/default

Compiler

Installation

wget http://mirrors.cdn.adacore.com/art/5739cefdc7a447658e0b016b
tar -xf gnat-gpl-2016-x86_64-linux-bin.tar.gz
./gnat-gpl-2016-x86_64-linux-bin/doinstall

Enter the following in the installation wizard:

/opt/gnat-gpl/gnat-gpl-2016

ln -snf /opt/gnat-gpl/gnat-gpl-2016 /opt/gnat-gpl/default

Test

gnatmake --version

Check the standard output:

GNATMAKE GPL 2016 (20160515-49)
Copyright (C) 1995-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Download release files

wget llvm-3.9.0.src.tar.xz
wget compiler-rt-3.9.0.src.tar.xz
wget cfe-3.9.0.src.tar.xz
wget clang-tools-extra-3.9.0.src.tar.xz

Extract downloaded release files

tar -xf llvm-3.9.0.src.tar.xz
tar -xf compiler-rt-3.9.0.src.tar.xz
tar -xf cfe-3.9.0.src.tar.xz
tar -xf clang-tools-extra-3.9.0.src.tar.xz

Create file structure for build

mv -f ./cfe-3.9.0.src ./clang
mv -f ./clang ./llvm-3.9.0.src/tools
mv -f ./compiler-rt-3.9.0.src ./compiler-rt
mv -f ./compiler-rt ./llvm-3.9.0.src/projects
mv -f ./clang-tools-extra-3.9.0.src ./extra
mv -f ./extra ./llvm-3.9.0.src/tools/clang/tools

Build out-of-source with CMake and install

cmake -G"Unix Makefiles" -Bllvm-3.9.0.build -Hllvm-3.9.0.src -DCMAKE_INSTALL_PREFIX=/opt/clang+llvm/clang+llvm-3.9.0
cmake --build llvm-3.9.0.build
sudo cmake --build llvm-3.9.0.build --target install
sudo ln -snf /opt/clang+llvm/llvm-3.9.0 /opt/llvm/default

Verify

Try to run a syntax check on a file using clang++:

clang++ -v main.cc -fsyntax-only

Check the standard/error output. If the output contains something similar to the following, Clang is unable to detect libstd++:

main.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
1 error generated.

Check the include paths of GCC:

g++ -v -x c++ /dev/null -fsyntax-only

Add the include paths missing for Clang to the environment variable CPLUS_INCLUDE_PATH:

export CPLUS_INCLUDE_PATH=/usr/include/c++/5:/usr/include/c++/5/x86_64-suse-linux:$CPLUS_INCLUDE_PATH

Check via the following command:

clang++ -v -x c++ /dev/null -fsyntax-only

Python

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
# Update all packages.
pip freeze > requirements.txt && pip install --upgrade -r requirements.txt && rm requirements.txt

Application

Network

Packet Sender

wget https://github.com/dannagle/PacketSender/archive/v4.1.tar.gz
tar -xf PacketSender-4.1.tar.gz
cd PacketSender-4.1/src
qmake
make
sudo mkdir -p /opt/packetsender/packetsender-4.1/bin /opt/packetsender/packetsender-4.1/doc
sudo cp PacketSender /opt/packetsender/packetsender-4.1/bin
sudo cp ../LICENSE ../README.md /opt/packetsender/packetsender-4.1/doc
sudo ln -snf /opt/packetsender/packetsender-4.1 /opt/packetsender/default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment