DoxyPress  1.4.1
Building libClang and libTooling

The build process for DoxyPress requires the libClang development libraries.

Linux Platforms

Clang Binaries

Pre-built binary versions of clang 10.0.1 are available on our CopperSpice download site.    Prebuilt clang binaries

Building libClang from Source

DoxyPress requires libClang to have the run time type information (RTTI) available to link properly with CopperSpice. The CopperSpice libraries use the RTTI information to do safe type casts, query type information at run time, and implement meta classes. The following scripts will build clang in release mode with RTTI enabled.


  • The first script is used to build and install clang for the following two platforms. This is required to have full C++17 support by using the libc++ standard library. The default standard library on these platforms only supports feature through C++14.
    • Debian 9
    • Ubuntu 16.04
mkdir -p ~/llvm/src
cd ~/llvm
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar.xz
tar -C src -xaf llvm-10.0.1.src.tar.xz
tar -C src/llvm-10.0.1.src/tools -xaf clang-10.0.1.src.tar.xz
mv src/llvm-10.0.1.src/tools/clang-10.0.1.src src/llvm-10.0.1.src/tools/clang
mkdir build
cd build
export CXXFLAGS="-stdlib=libc++"
cmake -GNinja -D CMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_RTTI:BOOLEAN=1 ../src/llvm-10.0.1.src
ninja
sudo ninja install

  • Use this second script to build and install clang for most versions of Debian, Fedora, Ubuntu, Arch, and Centos.
mkdir -p ~/llvm/src
cd ~/llvm
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar.xz
tar -C src -xaf llvm-10.0.1.src.tar.xz
tar -C src/llvm-10.0.1.src/tools -xaf clang-10.0.1.src.tar.xz
mv src/llvm-10.0.1.src/tools/clang-10.0.1.src src/llvm-10.0.1.src/tools/clang
mkdir build
cd build
cmake -GNinja -D CMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_RTTI:BOOLEAN=1 ../src/llvm-10.0.1.src
ninja
sudo ninja install

  • On FreeBSD use this script to build and install clang.
mkdir -p ~/llvm/src
cd ~/llvm
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar.xz
gtar -C src -xaf llvm-10.0.1.src.tar.xz
gtar -C src/llvm-10.0.1.src/tools -xaf clang-10.0.1.src.tar.xz
mv src/llvm-10.0.1.src/tools/clang-10.0.1.src src/llvm-10.0.1.src/tools/clang
mkdir build
cd build
cmake -GNinja -D CMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_RTTI:BOOLEAN=1 ../src/llvm-10.0.1.src
ninja
sudo ninja install


Mac OS X

Clang Binaries

Pre-built binary versions of clang 10.0.1 are available on our CopperSpice download site.    Prebuilt clang binaries

Building libClang from Source

The following commands will build and install clang from source using homebrew in release mode with RTTI enabled. DoxyPress requires libClang to have the run time type information (RTTI) available to link properly with CopperSpice. The CopperSpice libraries use the RTTI information to do safe type casts, query type information at run time, and implement meta classes.

brew tap homebrew/versions
brew install llvm@10


Windows

Clang Binaries

Pre-built binary versions of clang 10.0.1 are available on our CopperSpice download site.    Prebuilt clang binaries

Building libClang from Source

To build clang from source refer to the following documentation on our website.    Building clang for Windows from Source

When linking DoxyPress with libClang the following options must be passed to the configure script.

OS Build Flags passed to Configure
Windows 32 CXXFLAGS="-m32" LDFLAGS="-m32"
Windows 64 No additional flags are required