首页 > 解决方案 > How do I run programs / use SDK? (ubuntu)

问题描述

As the title implies, I'm a complete beginner.

I recently installed an SDK called Nuitrack and I want to run its sample code (for 3D hand tracking with the Intel Realsense depth camera): (http://download.3divi.com/Nuitrack/doc/nuitrack_console_sample_2src_2main_8cpp-example.html).

How do I run this code? Do I have to create a new file and paste this code in? If so, which file do I put the code into?

I know this sounds very basic, but I honestly have no idea where to go. It's kind of hard to look up "how to run code".

Any help would be greatly appreciated. Thanks!

标签: ubuntu

解决方案


How you "run" code depends on the type of code. In this case, you have pasted a link to some cpp code.

You need to build (compile and link) this. You probably have gcc to hand on Ubuntu. You need to tell it the name of you cpp file like this: If you try

 g++ main.cpp

You will almost certainly then get other errors, which may be answered in other stackoverflow questions. For example you need to tell it where you have put the headers and library files from the SDK.

It will generate an a.out file, which you can then run, like this

./a.out

(See here or here for more details).


推荐阅读