Skip to content

Latest commit

 

History

History
55 lines (50 loc) · 2.82 KB

HOWTO_RUN_CPP.md

File metadata and controls

55 lines (50 loc) · 2.82 KB

How to Run Example Codes with Microsoft Visual Studio

Prerequisites

  • Install Microsoft Visual Studio (shortly MSVS)
    • 📝 Note) Microsoft Visual Studio Community is free for students, open-source contributors, and individual developers.
  • Install Git and CMake
  • Install vcpkg (more details)
    • You need to move your working directory where you want to install vcpkg (I assume your working directory as C:/).
    git clone https://github.com/Microsoft/vcpkg.git
    .\vcpkg\bootstrap-vcpkg.bat
  • Install OpenCV and Ceres Solver using vcpkg
    cd vcpkg
    vcpkg install opencv[world,contrib]:x64-windows --recurse
    vcpkg install ceres[suitesparse,cxsparse,eigensparse,tools]:x64-windows
    vcpkg integrate install

Compiling and Running Examples

  1. Clone the repository: git clone https://github.com/mint-lab/3dv_tutorial.git
  2. Generate MSVS solution and project files
    • You need to specify the vcpkg directory where you installed it. (I assume you install it at C:/)
    cd 3dv_tutorial
    mkdir build
    cd build
    cmake .. "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
  3. Run your MSVS and open the generated solution file, build/3dv_tutorial.sln.
  4. Build the example codes in the solution (Menu > Build > Build Solution)
  5. Run the examples using F5 after specify your target as the startup project (Project Context Menu > Set as Startup Project)

How to Run Example Codes in Linux

Prerequisites

Running Examples

  1. Clone the repository: git clone https://github.com/mint-lab/3dv_tutorial.git
  2. Generate Makefile and project files
    cd 3dv_tutorial
    mkdir build
    cd build
    cmake ..
    make install
  3. Run the examples