-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How exactly the build procedure for librealsense for C++ work? How to use it while working on an independent code? #6797
Comments
Hi @milan-r-shah I hope that the link below will be helpful to you. |
CMake files provided with the examples are for building them inside the SDK. We also provide |
Thanks a lot @MartyG-RealSense & @dorodnic . As I'm working on Linux, the quoted response worked. I'm not sure whether you guys have already planned to update code-samples page or not but it would be really helpful, if you can include this Thanks again! |
Hi @milan-r-shah I think that the best way to progress with your request above is to mark this case with a Documentation label and leave it open so that your request about the examples can be looked at by Intel at a later date. Thanks! |
This is a duplicate of #10436. Has the IntelRealSense project provided an example of how to create an independent project? Request: |
Hi @SuperElectron There is a C++ example of creating a new project with CMake at the link below. https://github.com/IntelRealSense/librealsense/tree/master/examples/cmake There is also a Getting Started tutorial project in the link below, which does not have dependencies and so is a good learning experience before doing projects with dependencies. https://github.com/zivsha/librealsense/tree/getting_started_example/examples/getting-started Also, a RealSense user created a guide to setting up a Visual Studio project on Windows with the three props files provided by the RealSense SDK. https://github.com/EduardoWang/visual-studio-real-sense-record-and-playback-project The prop files are located in the root directory of the RealSense SDK folder at this Windows location after the full SDK has been installed: C: > Program Files (x86) > Intel RealSense SDK 2.0 |
Hi @SuperElectron Was the information in the comment above helpful to you, please? Thanks! |
Hey, thank you for the detailed reply.
I hope this explains what I was trying to say with my previous comment above: "It is very hard to understand how to create an independent project. The reason it is hard is because the examples repo builds 20+ examples in one script (I'd like to do it just for one project)."
So, my challenge is this:
Any thoughts, pointers, or hints is greatly appreciated. And thank you very much for the links @MartyG-RealSense , I will be reading them and trying to get this repo working. |
Hi @SuperElectron I will respond to your questions tomorrow in order to provide time to research them. Thanks in advance for your patience! |
Thanks again for your patience. A RealSense support team member provides advice at the link below for setting up an independent OpenVINO project in Visual Studio instead of CMake. Are you able to use Visual Studio on Windows? I was unable to find any CMake references for creating an independent OpenVINO project unfortunately. |
Hi all, Steps:-
Create a new Source file"FileName.cpp"
That's it! you have now successfully created your custom project with Intel RealSense SDK. |
Thanks so much @Shreyas-NR for sharing your detailed Windows and Visual Studio project setup guide with the RealSense community! |
Issue Description
How exactly the build procedure for librealsense for C++ work?
Initially, I was facing the problems with building example code snippets. So, I created #6784
Then to build them without any errors, I had to follow installation.md file for the proper installation of the library.
So, after running required scripts, for running an example code e.g. rs-hello-realsense.cpp (in Ubuntu 18.04 LTS), I did this:
and it worked!!
Afterwords, I also followed #2946 to understand what to do if I modify any example code. So, e.g. if I modify rs-hello-realsense.cpp then I have to do simply:
But, this procedure is only for example codes, right? The main confusion is how can I build my own independent code which is not residing in librealsense directory (but somewhere else)? How to use this library just like OpenCV or PCL (i.e. once installed globally, can be used from anywhere)?
Thanks in advance :)
The text was updated successfully, but these errors were encountered: