I am really new to this and RTAB. When I try to build the "Loop Closure Detection" tutorial, it says C:/workspace/libfreenect2/build/install_cuda/lib/freenect2.lib needed by example.exe, missing and no known rule to make it.
I tried looking around CMakeLists.txt and main.cpp but can't find where it specifies that freenect2.lib is needed. Besides, I am testing this out with ZED2 camera, do I need to install freenect2? Where can I change the camera source?
You can opt-out freenect2 from rtabmap compilation:
cmake -DWITH_FREENECT2=OFF .
cmake --build . --config Release
but... did you install RTAB-Map binaries with the installer or zip from the release? This package is not really meant to be used as library for other apps.
If you want to test loop closure detection alone, you can use RTAB-Map app, then in Preferences->RTAB-Map Settings, uncheck "Activate metric RGB-D SLAM". If you want to use rtabmap library for loop closure deteciton in another project (and thus really building the loop closure example), you will need to rebuild rtabmap from source as you will need development files from third party libraries (like PCL and OpenCV). Building rtabmap on Ubuntu is the easiest, on windows you can look at this file, which shows a recipe to build rtabmap with all dependencies on windows.