Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 2.14 KB

How_to_build.md

File metadata and controls

36 lines (20 loc) · 2.14 KB

This is a step by step "How To" for those who have no experience with C/C++ programming to build the software.

NOTE: There are usually many options to set up a development environment on each operating system. What proposed here is not the only option, but I try to minimize your effort. Besides, you may skip some of the steps if they have been properly set up already.

Step #1. Install a C/C++ compiler and necessary tools. Some compilers can be installed separately, but some compilers do come along with an IDE (Integrated Development Environment). We install the commonly used IDE if available on your operating system.

  • For Windows user, install Microsoft Visual Studio (NOT Visual Studio Code)   

  • For Mac users, install XCode from the Apple's App Store.

  • For Linux users, install C/C++ compiler and related tools through a few commands

    • If you are using Fedora, Red Hat, CentOS, or Scientific Linux, etc., use the following yum command:

      yum groupinstall 'Development Tools'

    • If you are using Debian, Ubuntu, and their variants, run the following apt-get commands one by one:

      sudo apt-get update

      sudo apt-get install build-essential cmake-gui xorg-dev libglu1-mesa-dev mesa-utils

Step #2. Build the software. Choose ONE of the following (or whatever you are familiar with):

  • Option 1: Use any IDE that can directly handle CMakeLists files to open the CMakeLists.txt in the root directory of the software. Then you should have obtained a usable project and just build. I recommend using CLion or QtCreator.

  • Option 2: Use CMake to generate project files for your IDE. Then load the project to your IDE and build.

  • Option 3: Use CMake to generate Makefiles. Then compile the project with:

    • on Linux/macOS: make
    • on Windows with Microsoft Visual Studio:
      • nmake
      • or msbuild adtree.sln /p:Configuration=Release

For more details, see How to Build a CMake-Based Project.