Items with no label
3335 Discussions

Guide to compiling Imgui libraries?

EFoo
Novice
2,564 Views

Hello,

Does anyone know how to import the Imgui library into a C++ Project? I have tried many methods but none seem to work.

I am trying to get an example [Streams Alignment](https://github.com/IntelRealSense/librealsense/blob/master/examples/align librealsense/examples/align at master · IntelRealSense/librealsense · GitHub ) to work, but no matter what i try, # include for example still does not work even though I have added it in Solution Explorer itself etc.

Apologies for such a question, this is challenging stuff for me. Only managed to figure out how to create a new project from scratch with the Intel Realsense D435 after many trials and error.

  1. Create new Visual C++ Project (Recommended: Empty Project)
  2. Go to View > Other Windows > Property Manager
  3. Click on "Add Existing Property Sheet" icon
  4. Navigate to "C:\Program Files (x86)\Intel RealSense SDK 2.0"
  5. Add intel.realsense.props, now # include can be used
  6. Navigate to your newly created Project in File Explorer
  7. Copy and paste these files [example.hpp, int-rs-splash.hpp, stb_easy_font.h, stb_image.h, stb_image_write.h] inside
  8. Right Click on Source Files in Solution Explorer
  9. Create new CPP File (Name: Source.CPP)
  10. Refresh CPP Project

Would appreciate any guidance. Thank you once again

0 Kudos
1 Reply
MartyG
Honored Contributor III
1,463 Views

It seems that in your project's CMakeList.txt file, you should be referencing the location of the Imgui files (which are in the Third Party folder of the SDK). The example linked to below is from the Align project.

https://github.com/IntelRealSense/librealsense/blob/development/examples/align/CMakeLists.txt# L21 librealsense/CMakeLists.txt at development · IntelRealSense/librealsense · GitHub

I do not use Visual Studio with RealSense for project compiling though (I develop in the Unity games engine), so others on this forum will be better able to advise you on how to set up and use CMake in your project.

0 Kudos
Reply