Items with no label
3335 Discussions

Setup Measure example

afeng1
Beginner
1,395 Views

Hi,

I am new to the librealsense SDK and am trying to get the Measure example setup from https://github.com/IntelRealSense/librealsense/tree/development/examples/measure https://github.com/IntelRealSense/librealsense/tree/development/examples/measure. However it doesn't have the visual studio project file in it. How do I set this up correctly? I'd really appreciate any help.

0 Kudos
3 Replies
MartyG
Honored Contributor III
303 Views

If you install the latest 2.9.1 version of the RealSense SDK 2.0 then you can find the Measure sample in the folder Intel RealSense SDK 2.0> samples > measure

There is a file in this folder called measure.vcxproj. You can download the SDK here:

https://github.com/IntelRealSense/librealsense/releases/tag/v2.9.1 Release Intel® RealSense™ SDK 2.0 (build 2.9.1) · IntelRealSense/librealsense · GitHub

0 Kudos
afeng1
Beginner
303 Views

I know that, but all I see is a cpp file, no actual visual studio project file. How can I turn this cpp file into the visual studio project?

Have you been able to successfully do this? Can you walk me through the process?

0 Kudos
MartyG
Honored Contributor III
303 Views

I have not built any source code in Visual Studio myself and could find no formal documentation on building the source of Realsense SDK 2.0 projects. I believe though that a tool called CMake can be used to build the source, using a 'list' file called CMakeList that is provided in the sample folders.

Visual Studio 2017 makes using CMake easier by automatically launching a CMakeList file if the file is included in the same folder as the cpp file.

https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-studio/ CMake support in Visual Studio | Visual C++ Team Blog

CmakeList files can be found on the online version of the samples.

https://github.com/IntelRealSense/librealsense/tree/master/examples/measure librealsense/examples/measure at master · IntelRealSense/librealsense · GitHub

For advice on using CMake with older versions of Visual Studio, I would refer you to this guide:

https://schneide.wordpress.com/2013/03/26/building-visual-c-projects-with-cmake/ Building Visual C++ Projects with CMake | Schneide Blog

An Intel support agent with experience in this area may also be able to advise you when they return to work on Monday. I apologize that I could not be of more use on this question. Have a great day!

0 Kudos
Reply