ubuntu - 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!
解决方案
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
推荐阅读
- ios - “此时无法安装此应用程序。” 只有在我尝试第二次以上运行该应用程序后我才能得到它
- mongodb - 无法在 Ubuntu 18.4LTS 上安装 CURL(需要 libcurl4),但安装它会删除 libcurl3,因此 mongo 无法正常工作
- python - Python 类属性长灵
- android - Android Studio 3.1.2 键盘在创建 Add to Git 对话框后停止工作
- sprite-kit - 当前在 SpriteKit 中的屏幕节点上重新渲染
- python - 如何在 Pandas 中使用 Serias
- javascript - Material-UI Disabled 属性不起作用
- android - Unicode 粗体字符不显示在移动浏览器或应用程序中
- django - Calling user follow/follower list in Django
- node.js - Authenticate jwt token and proxy to another server using Node JS