12 Replies Latest reply on Jun 21, 2018 2:00 AM by MartyG

    Simple Path to get a working C++ program for depth data from D435 camera

    johnbirk

      My D435 camera is still scheduled to arrive, despite it being over two months since it was ordered. I would like to make some progress in getting C++ code to access depth data. I have tried to get various GitHub code samples to work without success. For example, I started with rs-capture.cpp, then I needed example.hpp, then I needed stb_easy_font.h and still have lots of errors in Eclipse.

       

      Please recommend the simplest path to copying a complete working program that should collect a depth sample. I am hoping there is such a solution, that doesn’t have a seemingly endless stream of additional tidbits of needed knowledge. I am relatively new to C++, Linux, Eclipse, and Real Sense cameras.

        • 1. Re: Simple Path to get a working C++ program for depth data from D435 camera
          MartyG

          The most recent official delivery estimate for the D435 that I saw back on March 21 was '9 to 10 weeks'.  If you have been waiting two months then your order is probably getting closer to being fulfilled as the shippings are done in the order that they were received.  People definitely are receiving their D435 cameras, as evidenced by their postings about them on this forum.  Your patience is very much appreciated. 

           

          There does not seem to be a step by step guide to setting up a development environment from start to end, unfortunately.  This may be due to the numerous different ways and languages that development can be approached from. 

           

          Could you tell me what camera you are using for your tests please if your D435 has not yet arrived.  RealSense cameras contain special depth and infrared sensors, so an ordinary webcam camera would not be able to run most of the sample programs.

           

          If you do not yet have a RealSense D415 or D435 camera to test with, the page linked to below provides some pre-recorded data that you can drop into the RealSense Viewer program to look at it.

           

          librealsense/sample-data.md at master · IntelRealSense/librealsense · GitHub

          .

          • 2. Re: Simple Path to get a working C++ program for depth data from D435 camera
            johnbirk

            I don't have a Real Sense camera yet.  I am just trying to get some Intel Real Sense SDK code to work.  I downloaded the SDK and the files (lots) are in appropriate directories.

            • 3. Re: Simple Path to get a working C++ program for depth data from D435 camera
              MartyG

              RealSense SDK scripts usually make a call to the camera right from their first lines and are dependent on the presence of a camera to function without errors.  So you are not likely to have much success with running SDK scripts before you have a camera, unfortunately.

              • 5. Re: Simple Path to get a working C++ program for depth data from D435 camera
                johnbirk

                I now have a D435 camera, but am still having trouble getting a C++ program on Linux to work with it.


                I picked one of the basic programs, namely rs-capture ( https://github.com/IntelRealSense/librealsense/tree/master/examples/capture

                ), but it leads me toward "example.hpp"  which leads me to stb_easy_font.h, which leads me to rs.h with an error of    extern "C"  {


                I have an error "expected ' }' before end of line" in an exception program and an "expected declaration before end of line" in a line "# pragma GCC visibility push(default)"


                Please help me locate a simple program to get started.

                • 6. Re: Simple Path to get a working C++ program for depth data from D435 camera
                  MartyG

                  To edit and run C++ scripts, you need to have a script editing program set up.  Are you using one of these, please?

                   

                  The most popular one is Visual Studio.  If you are using Linux, you can find a Linux version called Visual Studio Code here:

                   

                  Visual Studio Code - Code Editing. Redefined

                   

                  Could you also confirm please that you are using the capture.cpp script file whose link is posted at the top of the page that you provided?   If you are copying and pasting the text from the tutorial then the program will not work, as it is just quoting pieces from the script in order to explain them step by step.

                   

                  An easy way to get the complete files without any script editing would be to right-click on the links in your web browser and select the save-file option (it may be called Save Link As or Save Target As, depending on the browser you are using).

                   

                   

                  Then save the files into a folder that you want to use as your project folder.  Once you have got your script editing program such as Visual Studio Code set up, I believe that double-clicking on the capture.cpp file in your project folder should cause the script editor program to launch and load the capture.cpp script into its editing window.

                   

                  Once you have successfully imported a script into Visual Studio, you need to tell the program where to find files such as example.cpp so that it can access them.  This process is called 'linking'.  I recently wrote a guide to doing so for Visual Studio 2017 on Windows.   I do not know if the process is the same for Visual Studio Code on Linux.

                   

                  Re: First contact with D415 ,What should I do

                  • 7. Re: Simple Path to get a working C++ program for depth data from D435 camera
                    jb455

                    You can't just open one of the sample code files and run it - you have to build and compile the project first. Instructions for doing this in Ubuntu are here: librealsense/installation.md at master · IntelRealSense/librealsense · GitHub

                    Then you'll get a solution file to open in visual studio with all the files linked together properly (assuming it's similar to the Windows process).

                    • 8. Re: Simple Path to get a working C++ program for depth data from D435 camera
                      MartyG

                      Thanks again JB.  Explaining in beginner terms how to set up the development environment and start experimenting with scripting is always challenging because there isn't any beginner documentation for doing so with SDK 2.0 - a certain amount of previous knowledge about coding and compiling is assumed.

                      • 9. Re: Simple Path to get a working C++ program for depth data from D435 camera
                        johnbirk

                        I have been using Codelite.  I have three files in the same folder for compilation: rs-capture.cpp, example.hpp, and stb_easy_font.h

                        Here are errors I'm getting upon build.

                        /bin/sh -c '/usr/bin/make -j8 -e -f  Makefile'

                        ----------Building project:[ rs_capture - Debug ]----------

                        make[1]: Entering directory '/home/jbirk/Documents/rs-capture/rs-capture'

                        /usr/bin/x86_64-linux-gnu-g++ -o ./Debug/rs_capture @"rs_capture.txt" -L. -L. -LDebug   -O0

                        ./Debug/rs-capture.cpp.o: In function `draw_pointcloud(float, float, glfw_state&, rs2::points&)':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:238: undefined reference to `glPopMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:239: undefined reference to `glPushAttrib'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:241: undefined reference to `glClearColor'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:242: undefined reference to `glClear'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:244: undefined reference to `glMatrixMode'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:245: undefined reference to `glPushMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:246: undefined reference to `gluPerspective'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:248: undefined reference to `glMatrixMode'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:249: undefined reference to `glPushMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:250: undefined reference to `gluLookAt'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:252: undefined reference to `glTranslatef'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:253: undefined reference to `glRotated'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:254: undefined reference to `glRotated'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:255: undefined reference to `glTranslatef'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:257: undefined reference to `glPointSize'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:258: undefined reference to `glEnable'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:259: undefined reference to `glEnable'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:260: undefined reference to `glBindTexture'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:262: undefined reference to `glTexParameterfv'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:263: undefined reference to `glTexParameteri'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:264: undefined reference to `glTexParameteri'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:265: undefined reference to `glBegin'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:275: undefined reference to `glVertex3fv'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:276: undefined reference to `glTexCoord2fv'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:281: undefined reference to `glEnd'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:282: undefined reference to `glPopMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:283: undefined reference to `glMatrixMode'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:284: undefined reference to `glPopMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:285: undefined reference to `glPopAttrib'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:286: undefined reference to `glPushMatrix'

                        ./Debug/rs-capture.cpp.o: In function `rs2::error::error(rs2_error*)':

                        /usr/include/librealsense2/hpp/rs_types.hpp:74: undefined reference to `rs2_get_error_message'

                        /usr/include/librealsense2/hpp/rs_types.hpp:76: undefined reference to `rs2_get_failed_function'

                        /usr/include/librealsense2/hpp/rs_types.hpp:76: undefined reference to `rs2_get_failed_function'

                        /usr/include/librealsense2/hpp/rs_types.hpp:77: undefined reference to `rs2_get_failed_args'

                        /usr/include/librealsense2/hpp/rs_types.hpp:77: undefined reference to `rs2_get_failed_args'

                        /usr/include/librealsense2/hpp/rs_types.hpp:78: undefined reference to `rs2_get_librealsense_exception_type'

                        /usr/include/librealsense2/hpp/rs_types.hpp:79: undefined reference to `rs2_free_error'

                        ./Debug/rs-capture.cpp.o: In function `rs2::error::handle(rs2_error*)':

                        /usr/include/librealsense2/hpp/rs_types.hpp:125: undefined reference to `rs2_get_librealsense_exception_type'

                        ./Debug/rs-capture.cpp.o: In function `rs2::stream_profile::stream_profile(rs2_stream_profile const*)':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:109: undefined reference to `rs2_get_stream_profile_data'

                        /usr/include/librealsense2/hpp/rs_frame.hpp:112: undefined reference to `rs2_is_stream_profile_default'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame::~frame()':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:266: undefined reference to `rs2_release_frame'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame::get_data() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:340: undefined reference to `rs2_get_frame_data'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame::get_profile() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:348: undefined reference to `rs2_get_frame_stream_profile'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame::add_ref() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:378: undefined reference to `rs2_frame_add_ref'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame::reset()':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:386: undefined reference to `rs2_release_frame'

                        ./Debug/rs-capture.cpp.o: In function `rs2::video_frame::video_frame(rs2::frame const&)':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:414: undefined reference to `rs2_is_frame_extendable_to'

                        ./Debug/rs-capture.cpp.o: In function `rs2::video_frame::get_width() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:429: undefined reference to `rs2_get_frame_width'

                        ./Debug/rs-capture.cpp.o: In function `rs2::video_frame::get_height() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:441: undefined reference to `rs2_get_frame_height'

                        ./Debug/rs-capture.cpp.o: In function `rs2::points::get_vertices() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:508: undefined reference to `rs2_get_frame_vertices'

                        ./Debug/rs-capture.cpp.o: In function `rs2::points::get_texture_coordinates() const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:525: undefined reference to `rs2_get_frame_texture_coordinates'

                        ./Debug/rs-capture.cpp.o: In function `rs2::depth_frame::depth_frame(rs2::frame const&)':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:546: undefined reference to `rs2_is_frame_extendable_to'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frameset::frameset(rs2::frame const&)':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:638: undefined reference to `rs2_is_frame_extendable_to'

                        /usr/include/librealsense2/hpp/rs_frame.hpp:648: undefined reference to `rs2_embedded_frames_count'

                        ./Debug/rs-capture.cpp.o: In function `rs2::processing_block::invoke(rs2::frame) const':

                        /usr/include/librealsense2/hpp/rs_processing.hpp:103: undefined reference to `rs2_process_frame'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame_queue::frame_queue(unsigned int)':

                        /usr/include/librealsense2/hpp/rs_processing.hpp:145: undefined reference to `rs2_create_frame_queue'

                        /usr/include/librealsense2/hpp/rs_processing.hpp:145: undefined reference to `rs2_delete_frame_queue'

                        ./Debug/rs-capture.cpp.o: In function `rs2::frame_queue::enqueue(rs2::frame) const':

                        /usr/include/librealsense2/hpp/rs_processing.hpp:159: undefined reference to `rs2_enqueue_frame'

                        ./Debug/rs-capture.cpp.o: In function `rs2::colorizer::colorizer()':

                        /usr/include/librealsense2/hpp/rs_processing.hpp:379: undefined reference to `rs2_create_colorizer'

                        /usr/include/librealsense2/hpp/rs_processing.hpp:379: undefined reference to `rs2_delete_processing_block'

                        ./Debug/rs-capture.cpp.o: In function `rs2::context::context()':

                        /usr/include/librealsense2/hpp/rs_context.hpp:84: undefined reference to `rs2_create_context'

                        /usr/include/librealsense2/hpp/rs_context.hpp:84: undefined reference to `rs2_delete_context'

                        ./Debug/rs-capture.cpp.o: In function `rs2::pipeline::pipeline(rs2::context)':

                        /usr/include/librealsense2/hpp/rs_pipeline.hpp:349: undefined reference to `rs2_create_pipeline'

                        /usr/include/librealsense2/hpp/rs_pipeline.hpp:349: undefined reference to `rs2_delete_pipeline'

                        ./Debug/rs-capture.cpp.o: In function `rs2::pipeline::start()':

                        /usr/include/librealsense2/hpp/rs_pipeline.hpp:371: undefined reference to `rs2_pipeline_start'

                        /usr/include/librealsense2/hpp/rs_pipeline.hpp:371: undefined reference to `rs2_delete_pipeline_profile'

                        ./Debug/rs-capture.cpp.o: In function `rs2::pipeline::wait_for_frames(unsigned int) const':

                        /usr/include/librealsense2/hpp/rs_pipeline.hpp:439: undefined reference to `rs2_pipeline_wait_for_frames'

                        ./Debug/rs-capture.cpp.o: In function `draw_text(int, int, char const*)':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:49: undefined reference to `glEnableClientState'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:50: undefined reference to `glVertexPointer'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:51: undefined reference to `glDrawArrays'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:52: undefined reference to `glDisableClientState'

                        ./Debug/rs-capture.cpp.o: In function `texture::upload(rs2::video_frame const&)':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:72: undefined reference to `glGenTextures'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:73: undefined reference to `glGetError'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:80: undefined reference to `glBindTexture'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:85: undefined reference to `glTexImage2D'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:88: undefined reference to `glTexImage2D'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:91: undefined reference to `glTexImage2D'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:97: undefined reference to `glTexParameteri'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:98: undefined reference to `glTexParameteri'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:99: undefined reference to `glTexParameteri'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:100: undefined reference to `glTexParameteri'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:101: undefined reference to `glPixelStorei'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:102: undefined reference to `glBindTexture'

                        ./Debug/rs-capture.cpp.o: In function `texture::show(rect const&) const':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:112: undefined reference to `glBindTexture'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:113: undefined reference to `glEnable'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:114: undefined reference to `glBegin'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:115: undefined reference to `glTexCoord2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:115: undefined reference to `glVertex2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:116: undefined reference to `glTexCoord2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:116: undefined reference to `glVertex2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:117: undefined reference to `glTexCoord2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:117: undefined reference to `glVertex2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:118: undefined reference to `glTexCoord2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:118: undefined reference to `glVertex2f'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:119: undefined reference to `glEnd'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:120: undefined reference to `glDisable'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:121: undefined reference to `glBindTexture'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:123: undefined reference to `rs2_stream_to_string'

                        ./Debug/rs-capture.cpp.o: In function `window::window(int, int, char const*)::{lambda(GLFWwindow*, int, int, int)#1}::operator()(GLFWwindow*, int, int, int) const':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:151: undefined reference to `glfwGetWindowUserPointer'

                        ./Debug/rs-capture.cpp.o: In function `window::window(int, int, char const*)::{lambda(GLFWwindow*, double, double)#2}::operator()(GLFWwindow*, double, double) const':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:157: undefined reference to `glfwGetWindowUserPointer'

                        ./Debug/rs-capture.cpp.o: In function `window::window(int, int, char const*)::{lambda(GLFWwindow*, double, double)#3}::operator()(GLFWwindow*, double, double) const':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:163: undefined reference to `glfwGetWindowUserPointer'

                        ./Debug/rs-capture.cpp.o: In function `window::window(int, int, char const*)::{lambda(GLFWwindow*, int, int, int, int)#4}::operator()(GLFWwindow*, int, int, int, int) const':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:169: undefined reference to `glfwGetWindowUserPointer'

                        ./Debug/rs-capture.cpp.o: In function `window::window(int, int, char const*)':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:142: undefined reference to `glfwInit'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:143: undefined reference to `glfwCreateWindow'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:146: undefined reference to `glfwMakeContextCurrent'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:148: undefined reference to `glfwSetWindowUserPointer'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:153: undefined reference to `glfwSetMouseButtonCallback'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:159: undefined reference to `glfwSetScrollCallback'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:165: undefined reference to `glfwSetCursorPosCallback'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:174: undefined reference to `glfwSetKeyCallback'

                        ./Debug/rs-capture.cpp.o: In function `window::operator bool()':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:182: undefined reference to `glPopMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:183: undefined reference to `glfwSwapBuffers'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:185: undefined reference to `glfwWindowShouldClose'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:187: undefined reference to `glfwPollEvents'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:188: undefined reference to `glfwGetFramebufferSize'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:191: undefined reference to `glClear'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:192: undefined reference to `glViewport'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:195: undefined reference to `glPushMatrix'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:196: undefined reference to `glfwGetWindowSize'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:197: undefined reference to `glOrtho'

                        ./Debug/rs-capture.cpp.o: In function `window::~window()':

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:204: undefined reference to `glfwDestroyWindow'

                        /home/jbirk/Documents/rs-capture/rs-capture/example.hpp:205: undefined reference to `glfwTerminate'

                        ./Debug/rs-capture.cpp.o: In function `void rs2::frameset::foreach<rs2::frameset::first_or_default(rs2_stream) const::{lambda(rs2::frame)#1}>(rs2::frameset::first_or_default(rs2_stream) const::{lambda(rs2::frame)#1}) const':

                        /usr/include/librealsense2/hpp/rs_frame.hpp:720: undefined reference to `rs2_extract_frame'

                        ./Debug/rs-capture.cpp.o: In function `void rs2::processing_block::start<rs2::frame_queue>(rs2::frame_queue)':

                        /usr/include/librealsense2/hpp/rs_processing.hpp:86: undefined reference to `rs2_start_processing'

                        ./Debug/rs-capture.cpp.o: In function `std::enable_if<std::is_base_of<rs2::frame, rs2::frame>::value, bool>::type rs2::frame_queue::poll_for_frame<rs2::frame>(rs2::frame*) const':

                        /usr/include/librealsense2/hpp/rs_processing.hpp:185: undefined reference to `rs2_poll_for_frame'

                        collect2: error: ld returned 1 exit status

                        rs_capture.mk:76: recipe for target 'Debug/rs_capture' failed

                        make[1]: *** [Debug/rs_capture] Error 1

                        make[1]: Leaving directory '/home/jbirk/Documents/rs-capture/rs-capture'

                        Makefile:4: recipe for target 'All' failed

                        make: *** [All] Error 2

                        ====125 errors, 0 warnings====

                        • 10. Re: Simple Path to get a working C++ program for depth data from D435 camera
                          MartyG

                          That is a lot of missing linkages.   Have you built the RealSense SDK 2.0 (also known as Librealsense2) like JB suggested above?

                           

                          librealsense/installation.md at master · IntelRealSense/librealsense · GitHub

                          • 12. Re: Simple Path to get a working C++ program for depth data from D435 camera
                            MartyG

                            Yes, it's a good idea to check through the steps on the installation page.  There are quite a few occasions where I could have made life easier for myself and saved time if I had RTFM (Read The Flipping Manual).