Rate This Document
Findability
Accuracy
Completeness
Readability

Installing gflags from Source Code

  1. Go to the /home directory.
    1
    cd /home
    
  2. Obtain the source package.
    1
    wget https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
    
    1
    mv v2.2.2.tar.gz gflags-2.2.2.tar.gz
    
  3. Decompress the source package.
    1
    tar -zxvf gflags-2.2.2.tar.gz
    
  4. Go to the source package directory.
    1
    cd gflags-2.2.2
    
  5. Create a directory.
    1
    mkdir build/
    
  6. Go to the new directory.
    cd build/
  7. Configure the compilation.
    1
    cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DINSTALL_HEADERS=ON -DINSTALL_SHARED_LIBS=ON -DINSTALL_STATIC_LIBS=ON ..
    

  8. Compile gflags.
    1
    make -j
    

  9. Install gflags.
    1
    make install
    

  10. Set environment variables.
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include/gflags